summaryrefslogtreecommitdiffstats
path: root/sbin/slattach/slattach.c
diff options
context:
space:
mode:
authorjb <jb@FreeBSD.org>1998-01-25 09:16:55 +0000
committerjb <jb@FreeBSD.org>1998-01-25 09:16:55 +0000
commitf8e8406f2f4baeafae485cb1e95cbd4e60f89c68 (patch)
tree984c28e72d3814046a5a086772f60f3d2906a6e3 /sbin/slattach/slattach.c
parent25ffc13079f21a41cd641a129a34313e23ffc275 (diff)
downloadFreeBSD-src-f8e8406f2f4baeafae485cb1e95cbd4e60f89c68.zip
FreeBSD-src-f8e8406f2f4baeafae485cb1e95cbd4e60f89c68.tar.gz
signal() returns an pointer, so must be cast to long, not int before
comparing < 0.
Diffstat (limited to 'sbin/slattach/slattach.c')
-rw-r--r--sbin/slattach/slattach.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sbin/slattach/slattach.c b/sbin/slattach/slattach.c
index 959ff4a..76d5b55 100644
--- a/sbin/slattach/slattach.c
+++ b/sbin/slattach/slattach.c
@@ -42,7 +42,7 @@ static char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)slattach.c 4.6 (Berkeley) 6/1/90";*/
-static char rcsid[] = "$Id: slattach.c,v 1.28 1997/06/19 14:33:42 charnier Exp $";
+static char rcsid[] = "$Id: slattach.c,v 1.29 1997/12/21 13:42:27 eivind Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -208,13 +208,13 @@ main(int argc, char **argv)
slip_discipline(); /* switch to slip line discipline */
/* upon INT log a timestamp and exit. */
- if ((int)signal(SIGINT,sigint_handler) < 0)
+ if ((long)signal(SIGINT,sigint_handler) < 0)
syslog(LOG_NOTICE,"cannot install SIGINT handler: %m");
/* upon TERM log a timestamp and exit. */
- if ((int)signal(SIGTERM,sigterm_handler) < 0)
+ if ((long)signal(SIGTERM,sigterm_handler) < 0)
syslog(LOG_NOTICE,"cannot install SIGTERM handler: %m");
/* upon HUP redial and reconnect. */
- if ((int)signal(SIGHUP,sighup_handler) < 0)
+ if ((long)signal(SIGHUP,sighup_handler) < 0)
syslog(LOG_NOTICE,"cannot install SIGHUP handler: %m");
if (redial_on_startup)
@@ -272,7 +272,7 @@ void acquire_line()
fclose(pidfile);
}
- if ((int)signal(SIGHUP,sighup_handler) < 0) /* Re-enable HUP signal */
+ if ((long)signal(SIGHUP,sighup_handler) < 0) /* Re-enable HUP signal */
syslog(LOG_NOTICE,"cannot install SIGHUP handler: %m");
if (uucp_lock) {
OpenPOWER on IntegriCloud