diff options
author | Colin Watson <cjwatson@debian.org> | 2003-09-01 18:42:19 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2003-09-01 18:42:19 +0000 |
commit | 8d6b7f4c46de3feb66f704ab483e51ea1a3bb0e1 (patch) | |
tree | 41fe3dd71501bbec5b0393f1536c925eaee180e9 /openbsd-compat/getopt.c | |
parent | f045c69060bfdd5cf8759a5f29d7008d02e4de5b (diff) | |
parent | 58bfa257481a1c6938ada9bbd38801cc45633fb0 (diff) |
Debian release 3.6p1-1.
Diffstat (limited to 'openbsd-compat/getopt.c')
-rw-r--r-- | openbsd-compat/getopt.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/openbsd-compat/getopt.c b/openbsd-compat/getopt.c index 4a5cfe5f0..a3fe807ee 100644 --- a/openbsd-compat/getopt.c +++ b/openbsd-compat/getopt.c | |||
@@ -35,7 +35,7 @@ | |||
35 | #if !defined(HAVE_GETOPT) || !defined(HAVE_GETOPT_OPTRESET) | 35 | #if !defined(HAVE_GETOPT) || !defined(HAVE_GETOPT_OPTRESET) |
36 | 36 | ||
37 | #if defined(LIBC_SCCS) && !defined(lint) | 37 | #if defined(LIBC_SCCS) && !defined(lint) |
38 | static char *rcsid = "$OpenBSD: getopt.c,v 1.2 1996/08/19 08:33:32 tholo Exp $"; | 38 | static char *rcsid = "$OpenBSD: getopt.c,v 1.4 2002/12/08 22:57:14 millert Exp $"; |
39 | #endif /* LIBC_SCCS and not lint */ | 39 | #endif /* LIBC_SCCS and not lint */ |
40 | 40 | ||
41 | #include <stdio.h> | 41 | #include <stdio.h> |
@@ -66,6 +66,9 @@ BSDgetopt(nargc, nargv, ostr) | |||
66 | static char *place = EMSG; /* option letter processing */ | 66 | static char *place = EMSG; /* option letter processing */ |
67 | char *oli; /* option letter list index */ | 67 | char *oli; /* option letter list index */ |
68 | 68 | ||
69 | if (ostr == NULL) | ||
70 | return (-1); | ||
71 | |||
69 | if (BSDoptreset || !*place) { /* update scanning pointer */ | 72 | if (BSDoptreset || !*place) { /* update scanning pointer */ |
70 | BSDoptreset = 0; | 73 | BSDoptreset = 0; |
71 | if (BSDoptind >= nargc || *(place = nargv[BSDoptind]) != '-') { | 74 | if (BSDoptind >= nargc || *(place = nargv[BSDoptind]) != '-') { |