]> andersk Git - openssh.git/commitdiff
- millert@cvs.openbsd.org 2002/12/09 16:50:30
authormouring <mouring>
Mon, 23 Dec 2002 02:24:54 +0000 (02:24 +0000)
committermouring <mouring>
Mon, 23 Dec 2002 02:24:54 +0000 (02:24 +0000)
     [ssh.c]
     Avoid setting optind to 0 as GNU getopt treats that like we do optreset.
     markus@ OK

ChangeLog
ssh.c

index 3124f961765fabaea3ef73a5de7467393655ef3a..68b967d5d32d5b6a9183eaab434960eae1ce2097 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
   - djm@cvs.openbsd.org 2002/12/06 05:20:02
      [sftp.1]
      Fix cut'n'paste error, spotted by matthias.riese@b-novative.de; ok deraadt@
+   - 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
 
 20021205
  - (djm) PERL-free fixpaths from stuge-openssh-unix-dev@cdy.org
diff --git a/ssh.c b/ssh.c
index c6beb1bcf4cdde3fd380d9d9db36c081b8fda43e..7162e680d39ff6d0e05cae30b1221ccc4c44983b 100644 (file)
--- 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. */
This page took 0.043914 seconds and 5 git commands to generate.