hwclock --get foo hwclock: 3 too many arguments given Fixed: hwclock --get foo hwclock: 1 too many arguments given Signed-off-by: J William Piggott <elseifthen@xxxxxxx> --- sys-utils/hwclock.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c index 9745158..aadf196 100644 --- a/sys-utils/hwclock.c +++ b/sys-utils/hwclock.c @@ -1444,13 +1444,13 @@ int main(int argc, char **argv) case 'h': /* --help */ usage(&ctl); default: - errtryhelp(EXIT_FAILURE); + errtryhelp(EX_USAGE); } } - if (argc > optind) { + if (argc -= optind) { warnx(_("%d too many arguments given"), argc); - errtryhelp(EXIT_FAILURE); + errtryhelp(EX_USAGE); } if (!ctl.adj_file_name) -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html