diff options
author | H. Peter Anvin <hpa@zytor.com> | 2004-07-26 22:10:31 +0000 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2004-07-26 22:10:31 +0000 |
commit | 95fa1a130b6ebecf0bebe7c92dfa84047db3e4ba (patch) | |
tree | e77e68012ce49e7272ce979442b424e072694643 | |
parent | d2eabc7c9852e600ba6b58c6f35468ec1ad1a90e (diff) | |
download | klibc-95fa1a130b6ebecf0bebe7c92dfa84047db3e4ba.tar.gz |
Fix bogus castsklibc-0.153
-rw-r--r-- | ash/trap.c | 6 | ||||
-rw-r--r-- | ash/trap.h | 11 |
2 files changed, 4 insertions, 13 deletions
diff --git a/ash/trap.c b/ash/trap.c index ce0cdcdd98bee..3e550d29bf85f 100644 --- a/ash/trap.c +++ b/ash/trap.c @@ -140,7 +140,7 @@ clear_traps() { * out what it should be set to. */ -int +__sighandler_t setsignal(signo) { int action; __sighandler_t sigact; @@ -188,7 +188,7 @@ setsignal(signo) { * There is a race condition here if action is not S_IGN. * A signal can be ignored that shouldn't be. */ - if ((int)(sigact = bsd_signal(signo, SIG_IGN)) == -1) + if ((sigact = bsd_signal(signo, SIG_IGN)) == SIG_ERR) error("Signal system call failed"); if (sigact == SIG_IGN) { *t = S_HARD_IGN; @@ -204,7 +204,7 @@ setsignal(signo) { case S_IGN: sigact = SIG_IGN; break; } *t = action; - return (int)bsd_signal(signo, sigact); + return bsd_signal(signo, sigact); } diff --git a/ash/trap.h b/ash/trap.h index cdb604bfa57be..c2ad188d1f2d2 100644 --- a/ash/trap.h +++ b/ash/trap.h @@ -41,18 +41,9 @@ extern int pendingsigs; -#ifdef __STDC__ void clear_traps(void); -int setsignal(int); +__sighandler_t setsignal(int); void ignoresig(int); void dotrap(void); void setinteractive(int); void exitshell(int); -#else -void clear_traps(); -int setsignal(); -void ignoresig(); -void dotrap(); -void setinteractive(); -void exitshell(); -#endif |