summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2004-04-01 22:32:28 +0000
committerache <ache@FreeBSD.org>2004-04-01 22:32:28 +0000
commit818fd42831740a9f3fdd040c9482b352ef3d7eca (patch)
tree6a6389c064303e74146848da0be1498b2b986a5e /lib
parent154503406719ae2ce6d7a51c4d12f0dac8a95830 (diff)
downloadFreeBSD-src-818fd42831740a9f3fdd040c9482b352ef3d7eca.zip
FreeBSD-src-818fd42831740a9f3fdd040c9482b352ef3d7eca.tar.gz
Simplify one condition in prev. commit:
short_too already assumes FLAG_LONGONLY
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/stdlib/getopt_long.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libc/stdlib/getopt_long.c b/lib/libc/stdlib/getopt_long.c
index 81dbe7d..28e24ae 100644
--- a/lib/libc/stdlib/getopt_long.c
+++ b/lib/libc/stdlib/getopt_long.c
@@ -252,8 +252,7 @@ parse_long_options(char * const *nargv, const char *options,
* If this is a known short option, don't allow
* a partial match of a single character.
*/
- if (short_too &&
- (!(flags & FLAG_LONGONLY) || current_argv_len == 1))
+ if (short_too && current_argv_len == 1)
continue;
if (match == -1) /* first partial match */
OpenPOWER on IntegriCloud