summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh.c
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2002-12-09 16:50:30 +0000
committermillert <millert@openbsd.org>2002-12-09 16:50:30 +0000
commit37f81715f9e3cc07fb53aa09e0b386f23b34af1a (patch)
tree020550d85db60554d8d708474bea186bfb8049f1 /usr.bin/ssh/ssh.c
parentmake sure getpeereid works in the agent; XXX test needs sudo (diff)
downloadwireguard-openbsd-37f81715f9e3cc07fb53aa09e0b386f23b34af1a.tar.xz
wireguard-openbsd-37f81715f9e3cc07fb53aa09e0b386f23b34af1a.zip
Avoid setting optind to 0 as GNU getopt treats that like we do optreset.
markus@ OK
Diffstat (limited to 'usr.bin/ssh/ssh.c')
-rw-r--r--usr.bin/ssh/ssh.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c
index dc795d72db9..a36a6eb8028 100644
--- a/usr.bin/ssh/ssh.c
+++ b/usr.bin/ssh/ssh.c
@@ -40,7 +40,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: ssh.c,v 1.188 2002/11/27 17:53:35 markus Exp $");
+RCSID("$OpenBSD: ssh.c,v 1.189 2002/12/09 16:50:30 millert Exp $");
#include <openssl/evp.h>
#include <openssl/err.h>
@@ -492,12 +492,11 @@ again:
host = ++cp;
} else
host = *av;
- ac--, av++;
- if (ac > 0) {
- optind = 0;
- optreset = 1;
+ if (ac > 1) {
+ optind = optreset = 1;
goto again;
}
+ ac--, av++;
}
/* Check that we got a host name. */