diff options
author | Hugh Graham <hugh@cvs.openbsd.org> | 1999-10-12 18:10:17 +0000 |
---|---|---|
committer | Hugh Graham <hugh@cvs.openbsd.org> | 1999-10-12 18:10:17 +0000 |
commit | 51e7429fa8a4ccf2297e598d0f1b8cae4c53436c (patch) | |
tree | 8af55f1d1f0affdc5de9d6f53b16a1d54e321d3a /sbin/ping | |
parent | ec2c726dfacff86e8a0d100a24fed2c8d00ac129 (diff) |
avoid an infinite loop
Diffstat (limited to 'sbin/ping')
-rw-r--r-- | sbin/ping/ping.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c index 32774304eac..689883e2d1f 100644 --- a/sbin/ping/ping.c +++ b/sbin/ping/ping.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ping.c,v 1.39 1999/07/18 16:21:55 hugh Exp $ */ +/* $OpenBSD: ping.c,v 1.40 1999/10/12 18:10:16 hugh Exp $ */ /* $NetBSD: ping.c,v 1.20 1995/08/11 22:37:58 cgd Exp $ */ /* @@ -47,7 +47,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)ping.c 8.1 (Berkeley) 6/5/93"; #else -static char rcsid[] = "$OpenBSD: ping.c,v 1.39 1999/07/18 16:21:55 hugh Exp $"; +static char rcsid[] = "$OpenBSD: ping.c,v 1.40 1999/10/12 18:10:16 hugh Exp $"; #endif #endif /* not lint */ @@ -942,7 +942,7 @@ qsqrt(quad_t qdev) x = qdev / x; x += y; x /= 2; - } while (x - y); + } while ((x - y) > 1 || (x - y) < -1); return(x); } |