aboutsummaryrefslogtreecommitdiff
path: root/bin/sh/options.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/sh/options.c')
-rw-r--r--bin/sh/options.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/bin/sh/options.c b/bin/sh/options.c
index 97171d32bff1..2dab8f4ea998 100644
--- a/bin/sh/options.c
+++ b/bin/sh/options.c
@@ -32,14 +32,6 @@
* SUCH DAMAGE.
*/
-#ifndef lint
-#if 0
-static char sccsid[] = "@(#)options.c 8.2 (Berkeley) 5/4/95";
-#endif
-#endif /* not lint */
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <signal.h>
#include <unistd.h>
#include <stdlib.h>
@@ -589,6 +581,9 @@ nextopt(const char *optstring)
shoptarg = p;
p = NULL;
}
- nextopt_optptr = p;
+ if (p != NULL && *p != '\0')
+ nextopt_optptr = p;
+ else
+ nextopt_optptr = NULL;
return c;
}