summaryrefslogtreecommitdiffstats
path: root/crypto/openssh/openbsd-compat/getopt.c
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2003-04-23 16:53:02 +0000
committerdes <des@FreeBSD.org>2003-04-23 16:53:02 +0000
commit6d34992e86f885f08b7df6e18a0b6af25ec2d664 (patch)
tree1a380064758bab3bc985ef1cc15a7b6633825c0f /crypto/openssh/openbsd-compat/getopt.c
parentdf96ff7f3774ba5a36cf1c6729762872945cc60a (diff)
parent85b37b9574631df0f7e774dda373514195c74b29 (diff)
downloadFreeBSD-src-6d34992e86f885f08b7df6e18a0b6af25ec2d664.zip
FreeBSD-src-6d34992e86f885f08b7df6e18a0b6af25ec2d664.tar.gz
This commit was generated by cvs2svn to compensate for changes in r113908,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'crypto/openssh/openbsd-compat/getopt.c')
-rw-r--r--crypto/openssh/openbsd-compat/getopt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/crypto/openssh/openbsd-compat/getopt.c b/crypto/openssh/openbsd-compat/getopt.c
index 4a5cfe5..a3fe807 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]) != '-') {
OpenPOWER on IntegriCloud