diff options
author | Florian Obser <florian@cvs.openbsd.org> | 2016-09-10 07:47:01 +0000 |
---|---|---|
committer | Florian Obser <florian@cvs.openbsd.org> | 2016-09-10 07:47:01 +0000 |
commit | 2cc34bfbdf65658ec7c93aff31eb3a0b8beb8d72 (patch) | |
tree | f9e7aaeab44067fc27269ac9130a3aed645153f6 /sbin | |
parent | aa7800785ac6896354add9b1ca33588d42eb1590 (diff) |
The getopt while loop is very long, put the body in {}.
Removes a "Huh, that's weird" diff to ping6. No object change.
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/ping/ping.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c index f2c6fd4a718..a07487fb4ea 100644 --- a/sbin/ping/ping.c +++ b/sbin/ping/ping.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ping.c,v 1.159 2016/09/10 07:46:20 florian Exp $ */ +/* $OpenBSD: ping.c,v 1.160 2016/09/10 07:47:00 florian Exp $ */ /* $NetBSD: ping.c,v 1.20 1995/08/11 22:37:58 cgd Exp $ */ /* @@ -217,7 +217,7 @@ main(int argc, char *argv[]) preload = 0; datap = &outpack[8 + sizeof(struct payload)]; while ((ch = getopt(argc, argv, - "DEI:LRS:c:defHi:l:np:qs:T:t:V:vw:")) != -1) + "DEI:LRS:c:defHi:l:np:qs:T:t:V:vw:")) != -1) { switch(ch) { case 'c': npackets = strtonum(optarg, 0, INT64_MAX, &errstr); @@ -346,6 +346,8 @@ main(int argc, char *argv[]) default: usage(); } + } + argc -= optind; argv += optind; |