summaryrefslogtreecommitdiffstats
path: root/usr.bin/time/time.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2017-07-22 16:20:10 +0000
committerschwarze <schwarze@openbsd.org>2017-07-22 16:20:10 +0000
commit6155540ecd19fa1238bebe79a81af5bd97aaa407 (patch)
treedd515c854d044cf6bfd317b8098d0ab024e39a34 /usr.bin/time/time.c
parentTolerate imprecise fault address on sparc64 where the hardware doesn't provide (diff)
downloadwireguard-openbsd-6155540ecd19fa1238bebe79a81af5bd97aaa407.tar.xz
wireguard-openbsd-6155540ecd19fa1238bebe79a81af5bd97aaa407.zip
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/time.c')
-rw-r--r--usr.bin/time/time.c12
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);
}