diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-04-28 04:25:22 +0400 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-04-28 04:25:22 +0400 |
commit | e4ed64067e7de0607cfb23b95a542e29a84bf1fa (patch) | |
tree | 43baa202b5a72a3fadc3cd9cd5e2a814ba9f389b /coreutils/date.c | |
parent | e6520f05328c38333284df5f42b9c2bfb7c4fec9 (diff) |
date: better version of previous commit; + fix testsuite
to have it checked
Diffstat (limited to 'coreutils/date.c')
-rw-r--r-- | coreutils/date.c | 6 |
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) 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 */ |