From 58332972c8ed662b36fa575355047d2de8b8f319 Mon Sep 17 00:00:00 2001 From: cheloha <> Date: Sun, 4 Dec 2022 23:50:46 +0000 Subject: 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@ --- src/regress/lib/libc/regex/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/regress/lib/libc/regex/main.c') diff --git a/src/regress/lib/libc/regex/main.c b/src/regress/lib/libc/regex/main.c index 50c3f7589e..4501e86b87 100644 --- a/src/regress/lib/libc/regex/main.c +++ b/src/regress/lib/libc/regex/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.11 2020/02/14 19:17:34 schwarze Exp $ */ +/* $OpenBSD: main.c,v 1.12 2022/12/04 23:50:46 cheloha Exp $ */ /* $NetBSD: main.c,v 1.2 1995/04/20 22:39:51 cgd Exp $ */ #include @@ -61,7 +61,6 @@ main(int argc, char *argv[]) case 'x': /* Debugging. */ debug++; break; - case '?': default: errflg++; break; -- cgit v1.2.3-55-g6feb