summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2017-12-25 21:36:05 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2017-12-25 21:36:05 +0100
commit8d8ee910f0a624fefd2a4aaefeb406003dea7807 (patch)
tree6c362ecdd08c525b59259400fe79a6a7cc4e7b71
parenta07fead8235c479f428dd5265e4f3539abb9c3fe (diff)
env: -u option fails due to typo
The -u option is supposed to be allowed to appear multiple times; the option string supplied to getopt32long requires it to be followed by a nonnegative integer. Reported-by: Keith Maxwell <keith.maxwell@gmail.com> Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--coreutils/env.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/coreutils/env.c b/coreutils/env.c
index 20453e871..0aebead1b 100644
--- a/coreutils/env.c
+++ b/coreutils/env.c
@@ -54,7 +54,7 @@ int env_main(int argc UNUSED_PARAM, char **argv)
unsigned opts;
llist_t *unset_env = NULL;
- opts = getopt32long(argv, "+iu:+",
+ opts = getopt32long(argv, "+iu:*",
"ignore-environment\0" No_argument "i"
"unset\0" Required_argument "u"
, &unset_env