diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2015-10-23 08:18:58 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2015-10-23 08:18:58 +0000 |
commit | 634ca7597b517b98b230acfb9f3fc10098f5552a (patch) | |
tree | 5ad4922e78a209e9a55d3dc5bc13619b014d0696 /usr.bin | |
parent | e746b98afd21afa0902147c29369858ebc56f8fe (diff) |
further simplify argv
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/netstat/main.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c index a3e0f7322d2..ddcac13fdf0 100644 --- a/usr.bin/netstat/main.c +++ b/usr.bin/netstat/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.107 2015/10/23 08:03:48 tedu Exp $ */ +/* $OpenBSD: main.c,v 1.108 2015/10/23 08:18:57 tedu Exp $ */ /* $NetBSD: main.c,v 1.9 1996/05/07 02:55:02 thorpej Exp $ */ /* @@ -263,15 +263,13 @@ main(int argc, char *argv[]) argv += optind; argc -= optind; - if (*argv) { - if (isdigit((unsigned char)**argv)) { - interval = strtonum(*argv, 1, INT_MAX, &errstr); - if (errstr) - errx(1, "interval is %s", errstr); - ++argv; - --argc; - iflag = 1; - } + if (argc) { + interval = strtonum(*argv, 1, INT_MAX, &errstr); + if (errstr) + errx(1, "interval is %s", errstr); + ++argv; + --argc; + iflag = 1; } if (argc) usage(); |