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