diff options
author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2003-04-23 16:53:02 +0000 |
---|---|---|
committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2003-04-23 16:53:02 +0000 |
commit | d0c8c0bcc279fcf7568c5e97c15c115cbf83be4c (patch) | |
tree | 70033bf9d0551c1f485a8bf5c04d41148812e33a /crypto/openssh/openbsd-compat/getopt.c | |
parent | 4b17dab0ba7675679933f9f3d4aed1cd28dd0393 (diff) |
Vendor import of OpenSSH-portable 3.6.1p1.
Notes
Notes:
svn path=/vendor-crypto/openssh/dist/; revision=113908
Diffstat (limited to 'crypto/openssh/openbsd-compat/getopt.c')
-rw-r--r-- | crypto/openssh/openbsd-compat/getopt.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crypto/openssh/openbsd-compat/getopt.c b/crypto/openssh/openbsd-compat/getopt.c index 4a5cfe5f0516..a3fe807ee402 100644 --- a/crypto/openssh/openbsd-compat/getopt.c +++ b/crypto/openssh/openbsd-compat/getopt.c @@ -35,7 +35,7 @@ #if !defined(HAVE_GETOPT) || !defined(HAVE_GETOPT_OPTRESET) #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: getopt.c,v 1.2 1996/08/19 08:33:32 tholo Exp $"; +static char *rcsid = "$OpenBSD: getopt.c,v 1.4 2002/12/08 22:57:14 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <stdio.h> @@ -66,6 +66,9 @@ BSDgetopt(nargc, nargv, ostr) static char *place = EMSG; /* option letter processing */ char *oli; /* option letter list index */ + if (ostr == NULL) + return (-1); + if (BSDoptreset || !*place) { /* update scanning pointer */ BSDoptreset = 0; if (BSDoptind >= nargc || *(place = nargv[BSDoptind]) != '-') { |