diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2000-04-29 16:46:37 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2000-04-29 16:46:37 +0000 |
commit | 6a79409061ad5907b31cd57188096291299bdd7d (patch) | |
tree | 8067751aae154abc7eab713c44a5d893b5c61884 | |
parent | 04892e54e67e64f22e0c8c95f12702d7c4e1cb7f (diff) |
compare return value of signal(3) to SIG_ERR, not < 0 as it has not returned
an int for ages...
-rw-r--r-- | usr.bin/time/time.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/time/time.c b/usr.bin/time/time.c index 5b3007872bc..ae72348d044 100644 --- a/usr.bin/time/time.c +++ b/usr.bin/time/time.c @@ -1,4 +1,4 @@ -/* $OpenBSD: time.c,v 1.5 1998/09/02 06:39:16 deraadt Exp $ */ +/* $OpenBSD: time.c,v 1.6 2000/04/29 16:46:36 millert Exp $ */ /* $NetBSD: time.c,v 1.7 1995/06/27 00:34:00 jtc Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)time.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: time.c,v 1.5 1998/09/02 06:39:16 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: time.c,v 1.6 2000/04/29 16:46:36 millert Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -171,10 +171,10 @@ main(argc, argv) } if (exitonsig) { - if (signal(exitonsig, SIG_DFL) < 0) + if (signal(exitonsig, SIG_DFL) == SIG_ERR) perror("signal"); else - kill(getpid(), exitonsig); + kill(getpid(), exitonsig); } exit(WIFEXITED(status) ? WEXITSTATUS(status) : EXIT_FAILURE); } |