diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2003-04-14 10:21:04 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2003-04-14 10:21:04 +0000 |
commit | 281c81bb9b84d9ada8e9e45561f446d52fae4ea6 (patch) | |
tree | 0eb2109080f275a911bcc788a865baaae4cf4868 /sbin/ping/ping.c | |
parent | 91d3ffe5845164b4a683f5814de198bfb401691a (diff) |
permit -s0. from Maxim Konovalov
Diffstat (limited to 'sbin/ping/ping.c')
-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 de43fbcac40..c329ba61539 100644 --- a/sbin/ping/ping.c +++ b/sbin/ping/ping.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ping.c,v 1.57 2002/09/06 21:17:39 deraadt Exp $ */ +/* $OpenBSD: ping.c,v 1.58 2003/04/14 10:21:03 itojun 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.57 2002/09/06 21:17:39 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: ping.c,v 1.58 2003/04/14 10:21:03 itojun Exp $"; #endif #endif /* not lint */ @@ -288,7 +288,7 @@ main(int argc, char *argv[]) break; case 's': /* size of packet to send */ datalen = strtol(optarg, NULL, 0); - if (datalen <= 0) + if (datalen < 0) errx(1, "bad packet size: %s", optarg); if (datalen > MAXPAYLOAD) errx(1, "packet size too large: %s", optarg); |