summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libc/stdlib/getopt_long.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/lib/libc/stdlib/getopt_long.c b/src/lib/libc/stdlib/getopt_long.c
index 48c26601ae..0de50457c2 100644
--- a/src/lib/libc/stdlib/getopt_long.c
+++ b/src/lib/libc/stdlib/getopt_long.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: getopt_long.c,v 1.31 2020/03/30 12:52:58 martijn Exp $ */ 1/* $OpenBSD: getopt_long.c,v 1.32 2020/05/27 22:25:09 schwarze Exp $ */
2/* $NetBSD: getopt_long.c,v 1.15 2002/01/31 22:43:40 tv Exp $ */ 2/* $NetBSD: getopt_long.c,v 1.15 2002/01/31 22:43:40 tv Exp $ */
3 3
4/* 4/*
@@ -418,15 +418,7 @@ start:
418 } 418 }
419 419
420 if ((optchar = (int)*place++) == (int)':' || 420 if ((optchar = (int)*place++) == (int)':' ||
421 (optchar == (int)'-' && *place != '\0') ||
422 (oli = strchr(options, optchar)) == NULL) { 421 (oli = strchr(options, optchar)) == NULL) {
423 /*
424 * If the user specified "-" and '-' isn't listed in
425 * options, return -1 (non-option) as per POSIX.
426 * Otherwise, it is an unknown option character (or ':').
427 */
428 if (optchar == (int)'-' && *place == '\0')
429 return (-1);
430 if (!*place) 422 if (!*place)
431 ++optind; 423 ++optind;
432 if (PRINT_ERROR) 424 if (PRINT_ERROR)