summaryrefslogtreecommitdiff
path: root/coreutils/date.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/date.c')
-rw-r--r--coreutils/date.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/coreutils/date.c b/coreutils/date.c
index 2c61aa6..5b0f60f 100644
--- a/coreutils/date.c
+++ b/coreutils/date.c
@@ -79,9 +79,11 @@ int date_main(int argc ATTRIBUTE_UNUSED, char **argv)
if (!(opt & (DATE_OPT_SET | DATE_OPT_DATE))) {
opt |= DATE_OPT_SET;
date_str = argv[0]; /* can be NULL */
- } else if (argv[0]) {
- bb_show_usage();
+ if (date_str)
+ argv++;
}
+ if (*argv)
+ bb_show_usage();
/* Now we have parsed all the information except the date format
which depends on whether the clock is being set or read */