diff options
author | Scott Soule Cheloha <cheloha@cvs.openbsd.org> | 2022-12-04 23:50:52 +0000 |
---|---|---|
committer | Scott Soule Cheloha <cheloha@cvs.openbsd.org> | 2022-12-04 23:50:52 +0000 |
commit | 7119931719c16b3e14f3ca5213b351e777080528 (patch) | |
tree | db01a02e50effc999803525fd4173a9bc9a2646f /usr.bin/netstat | |
parent | 45b7e652cd98369e756e28db16f4aad0626aec0d (diff) |
userspace: remove vestigial '?' cases from top-level getopt(3) loops
getopt(3) returns '?' when it encounters a flag not present in the in
the optstring or if a flag is missing its option argument. We can
handle this case with the "default" failure case with no loss of
legibility. Hence, remove all the redundant "case '?':" lines.
Prompted by dlg@. With help from dlg@ and millert@.
Link: https://marc.info/?l=openbsd-tech&m=167011979726449&w=2
ok naddy@ millert@ dlg@
Diffstat (limited to 'usr.bin/netstat')
-rw-r--r-- | usr.bin/netstat/main.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c index b168bc5855e..85cf5de1c15 100644 --- a/usr.bin/netstat/main.c +++ b/usr.bin/netstat/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.122 2022/09/08 13:18:47 kn Exp $ */ +/* $OpenBSD: main.c,v 1.123 2022/12/04 23:50:48 cheloha Exp $ */ /* $NetBSD: main.c,v 1.9 1996/05/07 02:55:02 thorpej Exp $ */ /* @@ -284,7 +284,6 @@ main(int argc, char *argv[]) errx(1, "interval is %s", errstr); iflag = 1; break; - case '?': default: usage(); } |