Date: Mon, 1 Jul 2002 11:46:10 +0000 (UTC) From: naddy@freebsd.org (Christian Weisgerber) To: freebsd-current@freebsd.org Subject: LP64: (int)signal() Message-ID: <afpfe2$6f5$1@kemoauc.mips.inka.de>
next in thread | raw e-mail | index | archive | help
I would like to clean up the last instances of (int)signal(...) in
the tree. Any objection to the changes below?
Other occurrences not worth touching:
- contrib/opie/opieftpd.c: contrib, not used
- libexec/bootpd/bootpd.c: #ifdef'ed out in favor of sigaction().
Index: atmarpd/atmarpd.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/atm/atmarpd/atmarpd.c,v
retrieving revision 1.4
diff -u -r1.4 atmarpd.c
--- atmarpd/atmarpd.c 9 Dec 2000 09:35:42 -0000 1.4
+++ atmarpd/atmarpd.c 1 Jul 2002 11:38:07 -0000
@@ -294,8 +294,7 @@
/*
* Set up signal handlers
*/
- rc = (int)signal(SIGINT, atmarp_sigint);
- if (rc == -1) {
+ if (signal(SIGINT, atmarp_sigint) == SIG_ERR) {
atmarp_log(LOG_ERR, "SIGINT signal setup failed");
exit(1);
}
Index: scspd/scspd.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/atm/scspd/scspd.c,v
retrieving revision 1.4
diff -u -r1.4 scspd.c
--- scspd/scspd.c 9 Dec 2000 09:35:42 -0000 1.4
+++ scspd/scspd.c 1 Jul 2002 11:38:08 -0000
@@ -319,14 +319,12 @@
/*
* Set up signal handlers
*/
- rc = (int)signal(SIGHUP, scsp_sighup);
- if (rc == -1) {
+ if (signal(SIGHUP, scsp_sighup) == SIG_ERR) {
scsp_log(LOG_ERR, "SIGHUP signal setup failed");
exit(1);
}
- rc = (int)signal(SIGINT, scsp_sigint);
- if (rc == -1) {
+ if (signal(SIGINT, scsp_sigint) == SIG_ERR) {
scsp_log(LOG_ERR, "SIGINT signal setup failed");
exit(1);
}
--
Christian "naddy" Weisgerber naddy@mips.inka.de
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?afpfe2$6f5$1>
