For "ssh -V" always exit 0, there is no need to check opt again.
authormillert <millert@openbsd.org>
Tue, 17 Jan 2023 18:52:44 +0000 (18:52 +0000)
committermillert <millert@openbsd.org>
Tue, 17 Jan 2023 18:52:44 +0000 (18:52 +0000)
This was missed when the fallthrough in the switch case above it
was removed.  OK deraadt@

usr.bin/ssh/ssh.c

index 9cbd69a..c931542 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh.c,v 1.583 2023/01/13 02:58:20 dtucker Exp $ */
+/* $OpenBSD: ssh.c,v 1.584 2023/01/17 18:52:44 millert Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -860,8 +860,7 @@ main(int ac, char **av)
                case 'V':
                        fprintf(stderr, "%s, %s\n",
                            SSH_VERSION, SSH_OPENSSL_VERSION);
-                       if (opt == 'V')
-                               exit(0);
+                       exit(0);
                        break;
                case 'w':
                        if (options.tun_open == -1)