From 37f81715f9e3cc07fb53aa09e0b386f23b34af1a Mon Sep 17 00:00:00 2001 From: millert Date: Mon, 9 Dec 2002 16:50:30 +0000 Subject: Avoid setting optind to 0 as GNU getopt treats that like we do optreset. markus@ OK --- usr.bin/ssh/ssh.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'usr.bin/ssh/ssh.c') 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 #include @@ -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. */ -- cgit v1.2.3-59-g8ed1b