summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
authorcheloha@openbsd.org <cheloha@openbsd.org>2022-12-04 23:50:49 +0000
committerDarren Tucker <dtucker@dtucker.net>2022-12-09 11:36:12 +1100
commitb85c3581c16aaf6e83b9a797c80705a56b1f312e (patch)
tree8b4b5be0b029b7629d0ddc43aabd3b62e882109d /sshd.c
parent9a067e8d28a2249fd73f004961e30c113ee85e5d (diff)
downloadopenssh-git-b85c3581c16aaf6e83b9a797c80705a56b1f312e.tar.gz
upstream: remove '?' from getopt(3) loops
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@ OpenBSD-Commit-ID: b2f89346538ce4f5b33ab8011a23e0626a67e66e
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sshd.c b/sshd.c
index d5e6a133..6bb3a962 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshd.c,v 1.592 2022/10/28 00:44:17 djm Exp $ */
+/* $OpenBSD: sshd.c,v 1.593 2022/12/04 23:50:49 cheloha Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1678,7 +1678,6 @@ main(int ac, char **av)
exit(1);
free(line);
break;
- case '?':
default:
usage();
break;