diff options
author | 2002-12-09 16:50:30 +0000 | |
---|---|---|
committer | 2002-12-09 16:50:30 +0000 | |
commit | 37f81715f9e3cc07fb53aa09e0b386f23b34af1a (patch) | |
tree | 020550d85db60554d8d708474bea186bfb8049f1 /usr.bin/ssh/ssh.c | |
parent | make sure getpeereid works in the agent; XXX test needs sudo (diff) | |
download | wireguard-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.c | 9 |
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. */ |