diff options
author | cheloha <> | 2022-12-04 23:50:46 +0000 |
---|---|---|
committer | cheloha <> | 2022-12-04 23:50:46 +0000 |
commit | 58332972c8ed662b36fa575355047d2de8b8f319 (patch) | |
tree | 5eb5951f7dde33b16ba81f465c477cccdca9cd8b /src/regress/lib/libc/db/dbtest.c | |
parent | b9ebe1afae8c014cb6a2f888ece3171de1fda423 (diff) | |
download | openbsd-58332972c8ed662b36fa575355047d2de8b8f319.tar.gz openbsd-58332972c8ed662b36fa575355047d2de8b8f319.tar.bz2 openbsd-58332972c8ed662b36fa575355047d2de8b8f319.zip |
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 'src/regress/lib/libc/db/dbtest.c')
-rw-r--r-- | src/regress/lib/libc/db/dbtest.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/regress/lib/libc/db/dbtest.c b/src/regress/lib/libc/db/dbtest.c index fd1d2e8077..3207bafda3 100644 --- a/src/regress/lib/libc/db/dbtest.c +++ b/src/regress/lib/libc/db/dbtest.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dbtest.c,v 1.20 2022/11/10 12:38:57 anton Exp $ */ | 1 | /* $OpenBSD: dbtest.c,v 1.21 2022/12/04 23:50:46 cheloha Exp $ */ |
2 | /* $NetBSD: dbtest.c,v 1.8 1996/05/03 21:57:48 cgd Exp $ */ | 2 | /* $NetBSD: dbtest.c,v 1.8 1996/05/03 21:57:48 cgd Exp $ */ |
3 | 3 | ||
4 | /*- | 4 | /*- |
@@ -107,7 +107,6 @@ main(int argc, char *argv[]) | |||
107 | case 's': | 107 | case 's': |
108 | sflag = 1; | 108 | sflag = 1; |
109 | break; | 109 | break; |
110 | case '?': | ||
111 | default: | 110 | default: |
112 | usage(); | 111 | usage(); |
113 | } | 112 | } |