From 7119931719c16b3e14f3ca5213b351e777080528 Mon Sep 17 00:00:00 2001 From: Scott Soule Cheloha Date: Sun, 4 Dec 2022 23:50:52 +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@ --- usr.bin/tty/tty.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'usr.bin/tty') diff --git a/usr.bin/tty/tty.c b/usr.bin/tty/tty.c index d1ba54b5fa8..14beca8e931 100644 --- a/usr.bin/tty/tty.c +++ b/usr.bin/tty/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.12 2021/07/12 15:09:20 beck Exp $ */ +/* $OpenBSD: tty.c,v 1.13 2022/12/04 23:50:50 cheloha Exp $ */ /* $NetBSD: tty.c,v 1.4 1994/12/07 00:46:57 jtc Exp $ */ /* @@ -50,7 +50,6 @@ main(int argc, char *argv[]) case 's': sflag = 1; break; - case '?': default: usage(); /* NOTREACHED */ -- cgit v1.2.3