diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2017-07-22 16:20:11 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2017-07-22 16:20:11 +0000 |
commit | c30e87c01ed0aeb81a308ca4d26fdf8b19c97d30 (patch) | |
tree | abba3ec29ccf54fd221ac0df0d21fba9d3e3bc4f /usr.bin/time | |
parent | b09caee8df96468359e9b8e113bc846634b5c661 (diff) |
no need to cast signal(3) and fprintf(3) return values to (void)
in standard use cases with constant arguments,
and prefer getprogname(3) over __progname;
from ScottCheloha at gmail dot com on tech
Diffstat (limited to 'usr.bin/time')
-rw-r--r-- | usr.bin/time/time.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/usr.bin/time/time.c b/usr.bin/time/time.c index 47eee9ee7d4..4a82fd8ad8c 100644 --- a/usr.bin/time/time.c +++ b/usr.bin/time/time.c @@ -1,4 +1,4 @@ -/* $OpenBSD: time.c,v 1.22 2017/07/13 06:39:54 tedu Exp $ */ +/* $OpenBSD: time.c,v 1.23 2017/07/22 16:20:10 schwarze Exp $ */ /* $NetBSD: time.c,v 1.7 1995/06/27 00:34:00 jtc Exp $ */ /* @@ -93,8 +93,8 @@ main(int argc, char *argv[]) } /* parent */ - (void)signal(SIGINT, SIG_IGN); - (void)signal(SIGQUIT, SIG_IGN); + signal(SIGINT, SIG_IGN); + signal(SIGQUIT, SIG_IGN); while (wait3(&status, 0, &ru) != pid) ; clock_gettime(CLOCK_MONOTONIC, &after); @@ -180,9 +180,7 @@ main(int argc, char *argv[]) __dead void usage(void) { - extern char *__progname; - - (void)fprintf(stderr, "usage: %s [-lp] utility [argument ...]\n", - __progname); + fprintf(stderr, "usage: %s [-lp] utility [argument ...]\n", + getprogname()); exit(1); } |