date: complain if there are extraneout arguments

This commit is contained in:
Denis Vlasenko 2008-04-28 00:10:34 +00:00
parent c0431ed455
commit e6520f0532

View File

@ -79,6 +79,8 @@ int date_main(int argc ATTRIBUTE_UNUSED, char **argv)
if (!(opt & (DATE_OPT_SET | DATE_OPT_DATE))) { if (!(opt & (DATE_OPT_SET | DATE_OPT_DATE))) {
opt |= DATE_OPT_SET; opt |= DATE_OPT_SET;
date_str = argv[0]; /* can be NULL */ date_str = argv[0]; /* can be NULL */
} else if (argv[0]) {
bb_show_usage();
} }
/* Now we have parsed all the information except the date format /* Now we have parsed all the information except the date format