diff options
author | cheloha@openbsd.org <cheloha@openbsd.org> | 2022-12-05 00:50:49 +0100 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2022-12-09 01:36:12 +0100 |
commit | b85c3581c16aaf6e83b9a797c80705a56b1f312e (patch) | |
tree | 8b4b5be0b029b7629d0ddc43aabd3b62e882109d /ssh-keygen.c | |
parent | upstream: Fix comment typo. (diff) | |
download | openssh-b85c3581c16aaf6e83b9a797c80705a56b1f312e.tar.xz openssh-b85c3581c16aaf6e83b9a797c80705a56b1f312e.zip |
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 'ssh-keygen.c')
-rw-r--r-- | ssh-keygen.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c index 5469037aa..ae05440f6 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keygen.c,v 1.460 2022/11/07 04:04:40 djm Exp $ */ +/* $OpenBSD: ssh-keygen.c,v 1.461 2022/12/04 23:50:49 cheloha Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -3544,7 +3544,6 @@ main(int argc, char **argv) else fatal("Unsupported moduli option %s", optarg); break; - case '?': default: usage(); } |