From 657a55681a1da0bd0388c0cddf8b0874a2e5e0b5 Mon Sep 17 00:00:00 2001 From: J William Piggott Date: Mon, 10 Apr 2017 13:39:49 -0400 Subject: hwclock: use errtryhelp() * sys-utils/hwclock.c: use errtryhelp() instead of usage(). Signed-off-by: J William Piggott --- sys-utils/hwclock.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'sys-utils/hwclock.c') diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c index 3875bcc54..a99eb6d60 100644 --- a/sys-utils/hwclock.c +++ b/sys-utils/hwclock.c @@ -1479,9 +1479,9 @@ int main(int argc, char **argv) out_version(); return 0; case 'h': /* --help */ - case '?': - default: usage(&ctl, NULL); + default: + errtryhelp(EXIT_FAILURE); } } @@ -1497,9 +1497,8 @@ int main(int argc, char **argv) } #endif if (argc > 0) { - usage(&ctl, _("%s takes no non-option arguments. " - "You supplied %d.\n"), program_invocation_short_name, - argc); + warnx(_("%d too many arguments given"), argc); + errtryhelp(EXIT_FAILURE); } if (!ctl.adj_file_name) -- cgit v1.2.3-55-g7522