diff options
author | kstailey <kstailey@cvs.openbsd.org> | 1997-06-18 22:42:50 +0000 |
---|---|---|
committer | kstailey <kstailey@cvs.openbsd.org> | 1997-06-18 22:42:50 +0000 |
commit | c8708ed93617f5d278f4f7faf294a6e7c57227df (patch) | |
tree | 83832809b6ff198d789d720827ee338c50df8b37 /bin/ksh/trap.c | |
parent | e37d7f641aedb36d7e29530bb5d9c2fe398d1407 (diff) |
(foo *)0 -> NULL
Diffstat (limited to 'bin/ksh/trap.c')
-rw-r--r-- | bin/ksh/trap.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/bin/ksh/trap.c b/bin/ksh/trap.c index 7933f2d7e31..15128ff49e0 100644 --- a/bin/ksh/trap.c +++ b/bin/ksh/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.2 1996/08/19 20:09:00 downsj Exp $ */ +/* $OpenBSD: trap.c,v 1.3 1997/06/18 22:42:46 kstailey Exp $ */ /* * signal handling @@ -123,7 +123,7 @@ trapsig(i) (*p->shtrap)(i); #ifdef V7_SIGNALS if (sigtraps[i].cursig == trapsig) /* this for SIGCHLD,SIGALRM */ - sigaction(i, &Sigact_trap, (struct sigaction *) 0); + sigaction(i, &Sigact_trap, NULL); #endif /* V7_SIGNALS */ return RETSIGVAL; } @@ -203,7 +203,7 @@ runtraps(flag) fatal_trap = 0; for (p = sigtraps, i = SIGNALS+1; --i >= 0; p++) if (p->set && (!flag - || ((p->flags & flag) && p->trap == (char *) 0))) + || ((p->flags & flag) && p->trap == NULL))) runtrap(p); } @@ -217,7 +217,7 @@ runtrap(p) int UNINITIALIZED(old_changed); p->set = 0; - if (trapstr == (char *) 0) { /* SIG_DFL */ + if (trapstr == NULL) { /* SIG_DFL */ if (p->flags & TF_FATAL) { /* eg, SIGHUP */ exstat = 128 + i; @@ -235,7 +235,7 @@ runtrap(p) if (i == SIGEXIT_ || i == SIGERR_) { /* avoid recursion on these */ old_changed = p->flags & TF_CHANGED; p->flags &= ~TF_CHANGED; - p->trap = (char *) 0; + p->trap = NULL; } oexstat = exstat; command(trapstr); @@ -263,7 +263,7 @@ cleartraps() for (i = SIGNALS+1, p = sigtraps; --i >= 0; p++) { p->set = 0; if ((p->flags & TF_USER_SET) && (p->trap && p->trap[0])) - settrap(p, (char *) 0); + settrap(p, NULL); } } @@ -395,7 +395,7 @@ setsig(p, f, flags) sigemptyset(&sigact.sa_mask); sigact.sa_flags = KSH_SA_FLAGS; sigact.sa_handler = f; - sigaction(p->signal, &sigact, (struct sigaction *) 0); + sigaction(p->signal, &sigact, NULL); } return 1; |