Source-Changes-HG archive

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

[src/trunk]: src/sbin/ping6 Accept "-s 0"



details:   https://anonhg.NetBSD.org/src/rev/cb0c493bc328
branches:  trunk
changeset: 781489:cb0c493bc328
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Mon Sep 10 04:32:24 2012 +0000

description:
Accept "-s 0"

diffstat:

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

diffs (27 lines):

diff -r d57b91acf04e -r cb0c493bc328 sbin/ping6/ping6.c
--- a/sbin/ping6/ping6.c        Sun Sep 09 20:23:38 2012 +0000
+++ b/sbin/ping6/ping6.c        Mon Sep 10 04:32:24 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ping6.c,v 1.80 2012/01/04 16:09:42 drochner Exp $      */
+/*     $NetBSD: ping6.c,v 1.81 2012/09/10 04:32:24 msaitoh Exp $       */
 /*     $KAME: ping6.c,v 1.164 2002/11/16 14:05:37 itojun Exp $ */
 
 /*
@@ -77,7 +77,7 @@
 #else
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: ping6.c,v 1.80 2012/01/04 16:09:42 drochner Exp $");
+__RCSID("$NetBSD: ping6.c,v 1.81 2012/09/10 04:32:24 msaitoh Exp $");
 #endif
 #endif
 
@@ -504,7 +504,7 @@
                        break;
                case 's':               /* size of packet to send */
                        datalen = strtol(optarg, &e, 10);
-                       if (datalen <= 0 || *optarg == '\0' || *e != '\0')
+                       if (datalen < 0 || *optarg == '\0' || *e != '\0')
                                errx(1, "illegal datalen value -- %s", optarg);
                        if (datalen > MAXDATALEN) {
                                errx(1,



Home | Main Index | Thread Index | Old Index