summaryrefslogtreecommitdiff
path: root/ssh.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2002-12-23 02:24:54 +0000
committerBen Lindstrom <mouring@eviladmin.org>2002-12-23 02:24:54 +0000
commitb9fa691819cabfeb1a1bc721daa45593e1bb59e2 (patch)
treedbad008a906722e7d846068cdedc98adc39fc1fc /ssh.c
parentd57678182944d4acf87b7dfa0db7725e7721c6d6 (diff)
downloadopenssh-git-b9fa691819cabfeb1a1bc721daa45593e1bb59e2.tar.gz
- millert@cvs.openbsd.org 2002/12/09 16:50:30
[ssh.c] Avoid setting optind to 0 as GNU getopt treats that like we do optreset. markus@ OK
Diffstat (limited to 'ssh.c')
-rw-r--r--ssh.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/ssh.c b/ssh.c
index c6beb1bc..7162e680 100644
--- a/ssh.c
+++ b/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>
@@ -505,12 +505,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. */