diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2015-10-23 08:18:31 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2015-10-23 08:18:31 +0000 |
commit | e746b98afd21afa0902147c29369858ebc56f8fe (patch) | |
tree | f7b90d10478695dbb0ddb299e097a6483bdc8d4d /usr.bin/nfsstat | |
parent | b984ab240166ef6116c75b5f72c0f1b885280506 (diff) |
cleanup argv handling a bit
Diffstat (limited to 'usr.bin/nfsstat')
-rw-r--r-- | usr.bin/nfsstat/nfsstat.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/usr.bin/nfsstat/nfsstat.c b/usr.bin/nfsstat/nfsstat.c index 878a0eed164..ab6f05ebd36 100644 --- a/usr.bin/nfsstat/nfsstat.c +++ b/usr.bin/nfsstat/nfsstat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfsstat.c,v 1.34 2015/01/16 06:40:10 deraadt Exp $ */ +/* $OpenBSD: nfsstat.c,v 1.35 2015/10/23 08:18:30 tedu Exp $ */ /* $NetBSD: nfsstat.c,v 1.7 1996/03/03 17:21:30 thorpej Exp $ */ /* @@ -112,19 +112,13 @@ main(int argc, char *argv[]) argc -= optind; argv += optind; -#define BACKWARD_COMPATIBILITY -#ifdef BACKWARD_COMPATIBILITY - if (*argv) { + if (argc) { interval = (u_int)strtonum(*argv, 0, 1000, &errstr); if (errstr) errx(1, "invalid interval %s: %s", *argv, errstr); - if (*++argv) { - nlistf = *argv; - if (*++argv) - memf = *argv; - } + ++argv; + --argc; } -#endif if (nlistf || memf) { char errbuf[_POSIX2_LINE_MAX]; |