diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-11-17 19:49:42 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-11-17 19:49:42 +0000 |
commit | f664c99523803169394338e73ca135f9e0747e4c (patch) | |
tree | 2f994841c529b09007609269dbafc91aeb3fc069 /usr.sbin | |
parent | c55ddf58f562dd3d0ed78b353331172be9cef96e (diff) |
use volatile sig_atomic_t where possible; simply volatile i other places
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/faithd/tcp.c | 4 | ||||
-rw-r--r-- | usr.sbin/iostat/iostat.c | 5 | ||||
-rw-r--r-- | usr.sbin/rip6query/rip6query.c | 4 | ||||
-rw-r--r-- | usr.sbin/rtadvd/rtadvd.c | 6 | ||||
-rw-r--r-- | usr.sbin/rtsold/rtsold.c | 4 | ||||
-rw-r--r-- | usr.sbin/rwhod/rwhod.c | 4 | ||||
-rw-r--r-- | usr.sbin/sliplogin/sliplogin.c | 4 | ||||
-rw-r--r-- | usr.sbin/slstats/slstats.c | 6 | ||||
-rw-r--r-- | usr.sbin/syslogd/syslogd.c | 10 |
9 files changed, 24 insertions, 23 deletions
diff --git a/usr.sbin/faithd/tcp.c b/usr.sbin/faithd/tcp.c index d30cc699843..6f026212cd2 100644 --- a/usr.sbin/faithd/tcp.c +++ b/usr.sbin/faithd/tcp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp.c,v 1.8 2001/11/16 19:55:49 deraadt Exp $ */ +/* $OpenBSD: tcp.c,v 1.9 2001/11/17 19:49:38 deraadt Exp $ */ /* $KAME: tcp.c,v 1.6 2001/07/02 14:36:49 itojun Exp $ */ /* @@ -59,7 +59,7 @@ static fd_set readfds, writefds, exceptfds; static char atmark_buf[2]; static pid_t cpid = (pid_t)0; static pid_t ppid = (pid_t)0; -static time_t child_lastactive = (time_t)0; +volatile time_t child_lastactive = (time_t)0; static time_t parent_lastactive = (time_t)0; static void sig_ctimeout __P((int)); diff --git a/usr.sbin/iostat/iostat.c b/usr.sbin/iostat/iostat.c index ec6f3c51732..4ea321db198 100644 --- a/usr.sbin/iostat/iostat.c +++ b/usr.sbin/iostat/iostat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: iostat.c,v 1.10 2001/11/14 20:04:40 deraadt Exp $ */ +/* $OpenBSD: iostat.c,v 1.11 2001/11/17 19:49:38 deraadt Exp $ */ /* $NetBSD: iostat.c,v 1.10 1996/10/25 18:21:58 scottr Exp $ */ /* @@ -103,7 +103,8 @@ char *nlistf, *memf; int hz, reps, interval; static int todo = 0; -static int wantheader; + +volatile sig_atomic_t wantheader; #define ISSET(x, a) ((x) & (a)) #define SHOW_CPU 0x0001 diff --git a/usr.sbin/rip6query/rip6query.c b/usr.sbin/rip6query/rip6query.c index 61dcceb8a2a..01d10649558 100644 --- a/usr.sbin/rip6query/rip6query.c +++ b/usr.sbin/rip6query/rip6query.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rip6query.c,v 1.4 2001/11/16 07:16:48 itojun Exp $ */ +/* $OpenBSD: rip6query.c,v 1.5 2001/11/17 19:49:40 deraadt Exp $ */ /* $KAME: rip6query.c,v 1.15 2001/11/16 07:01:21 itojun Exp $ */ /* @@ -216,5 +216,5 @@ sigalrm_handler(sig) int sig; { - exit(0); + _exit(0); } diff --git a/usr.sbin/rtadvd/rtadvd.c b/usr.sbin/rtadvd/rtadvd.c index ad7288301b2..489d63285fb 100644 --- a/usr.sbin/rtadvd/rtadvd.c +++ b/usr.sbin/rtadvd/rtadvd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtadvd.c,v 1.9 2001/02/04 06:22:05 itojun Exp $ */ +/* $OpenBSD: rtadvd.c,v 1.10 2001/11/17 19:49:40 deraadt Exp $ */ /* $KAME: rtadvd.c,v 1.50 2001/02/04 06:15:15 itojun Exp $ */ /* @@ -68,8 +68,8 @@ static u_char *rcvcmsgbuf; static size_t rcvcmsgbuflen; static u_char *sndcmsgbuf = NULL; static size_t sndcmsgbuflen; -static int do_dump; -static int do_die; +volatile sig_atomic_t do_dump; +volatile sig_atomic_t do_die; struct msghdr sndmhdr; struct iovec rcviov[2]; struct iovec sndiov[2]; diff --git a/usr.sbin/rtsold/rtsold.c b/usr.sbin/rtsold/rtsold.c index 8f8dcd11c5f..e5f612ea174 100644 --- a/usr.sbin/rtsold/rtsold.c +++ b/usr.sbin/rtsold/rtsold.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtsold.c,v 1.10 2001/07/09 22:37:33 itojun Exp $ */ +/* $OpenBSD: rtsold.c,v 1.11 2001/11/17 19:49:40 deraadt Exp $ */ /* $KAME: rtsold.c,v 1.32 2001/07/09 22:34:07 itojun Exp $ */ /* @@ -85,7 +85,7 @@ int main __P((int argc, char *argv[])); /* static variables and functions */ static int mobile_node = 0; -static int do_dump; +volatile sig_atomic_t do_dump; static char *dumpfilename = "/var/run/rtsold.dump"; /* XXX: should be configurable */ static char *pidfilename = "/var/run/rtsold.pid"; /* should be configurable */ diff --git a/usr.sbin/rwhod/rwhod.c b/usr.sbin/rwhod/rwhod.c index d73d0eb3ee0..e3328b84de5 100644 --- a/usr.sbin/rwhod/rwhod.c +++ b/usr.sbin/rwhod/rwhod.c @@ -39,7 +39,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "@(#)rwhod.c 8.1 (Berkeley) 6/6/93";*/ -static char rcsid[] = "$OpenBSD: rwhod.c,v 1.18 2001/11/14 21:36:37 millert Exp $"; +static char rcsid[] = "$OpenBSD: rwhod.c,v 1.19 2001/11/17 19:49:40 deraadt Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -97,7 +97,7 @@ struct whod mywd; struct servent *sp; int s, utmpf; -int gothup; +volatile sig_atomic_t gothup; #define WHDRSIZE (sizeof(mywd) - sizeof(mywd.wd_we)) diff --git a/usr.sbin/sliplogin/sliplogin.c b/usr.sbin/sliplogin/sliplogin.c index 241741f3a25..ea268d4ef5f 100644 --- a/usr.sbin/sliplogin/sliplogin.c +++ b/usr.sbin/sliplogin/sliplogin.c @@ -39,7 +39,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)sliplogin.c 5.6 (Berkeley) 3/2/91";*/ -static char rcsid[] = "$Id: sliplogin.c,v 1.17 2001/11/17 03:58:00 deraadt Exp $"; +static char rcsid[] = "$Id: sliplogin.c,v 1.18 2001/11/17 19:49:40 deraadt Exp $"; #endif /* not lint */ /* @@ -180,7 +180,7 @@ sigstr(s) } } -int die; +volatile sig_atomic_t die; void hup_handler(s) diff --git a/usr.sbin/slstats/slstats.c b/usr.sbin/slstats/slstats.c index 7c11fb413d4..4390bc776c0 100644 --- a/usr.sbin/slstats/slstats.c +++ b/usr.sbin/slstats/slstats.c @@ -1,4 +1,4 @@ -/* $OpenBSD: slstats.c,v 1.12 2001/08/09 08:45:32 deraadt Exp $ */ +/* $OpenBSD: slstats.c,v 1.13 2001/11/17 19:49:41 deraadt Exp $ */ /* $NetBSD: slstats.c,v 1.6.6.1 1996/06/07 01:42:30 thorpej Exp $ */ /* @@ -25,7 +25,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: slstats.c,v 1.12 2001/08/09 08:45:32 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: slstats.c,v 1.13 2001/11/17 19:49:41 deraadt Exp $"; #endif #define INET @@ -131,7 +131,7 @@ usage() exit(1); } -sig_atomic_t signalled; /* set if alarm goes off "early" */ +volatile sig_atomic_t signalled; /* set if alarm goes off "early" */ static void get_sl_stats(curp) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 7c7ca739f1e..a0fd167d281 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: syslogd.c,v 1.46 2001/11/17 13:33:42 markus Exp $ */ +/* $OpenBSD: syslogd.c,v 1.47 2001/11/17 19:49:41 deraadt Exp $ */ /* * Copyright (c) 1983, 1988, 1993, 1994 @@ -43,7 +43,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)syslogd.c 8.3 (Berkeley) 4/4/94"; #else -static char rcsid[] = "$OpenBSD: syslogd.c,v 1.46 2001/11/17 13:33:42 markus Exp $"; +static char rcsid[] = "$OpenBSD: syslogd.c,v 1.47 2001/11/17 19:49:41 deraadt Exp $"; #endif #endif /* not lint */ @@ -194,9 +194,9 @@ int Initialized = 0; /* set when we have initialized ourselves */ int MarkInterval = 20 * 60; /* interval between marks in seconds */ int MarkSeq = 0; /* mark sequence number */ -sig_atomic_t MarkSet; -sig_atomic_t WantDie; -sig_atomic_t DoInit; +volatile sig_atomic_t MarkSet; +volatile sig_atomic_t WantDie; +volatile sig_atomic_t DoInit; int SecureMode = 1; /* when true, speak only unix domain socks */ |