Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/ping permit -s 0. from Maxim Konovalov



details:   https://anonhg.NetBSD.org/src/rev/eabde0068ad8
branches:  trunk
changeset: 545677:eabde0068ad8
user:      itojun <itojun%NetBSD.org@localhost>
date:      Mon Apr 14 10:18:37 2003 +0000

description:
permit -s 0.  from Maxim Konovalov

diffstat:

 sbin/ping/ping.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r ca01c8c0bac8 -r eabde0068ad8 sbin/ping/ping.c
--- a/sbin/ping/ping.c  Mon Apr 14 09:49:15 2003 +0000
+++ b/sbin/ping/ping.c  Mon Apr 14 10:18:37 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ping.c,v 1.71 2002/11/16 16:39:55 itojun Exp $ */
+/*     $NetBSD: ping.c,v 1.72 2003/04/14 10:18:37 itojun Exp $ */
 
 /*
  * Copyright (c) 1989, 1993
@@ -62,7 +62,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: ping.c,v 1.71 2002/11/16 16:39:55 itojun Exp $");
+__RCSID("$NetBSD: ping.c,v 1.72 2003/04/14 10:18:37 itojun Exp $");
 #endif
 
 #include <stdio.h>
@@ -336,7 +336,7 @@
                        break;
                case 's':               /* size of packet to send */
                        datalen = strtol(optarg, &p, 0);
-                       if (*p != '\0' || datalen <= 0)
+                       if (*p != '\0' || datalen < 0)
                                errx(1, "Bad/invalid packet size %s", optarg);
                        if (datalen > MAXPACKET)
                                errx(1, "packet size is too large");



Home | Main Index | Thread Index | Old Index