summaryrefslogtreecommitdiffstats
path: root/libc/signal/sigintr.c
diff options
context:
space:
mode:
authorCarmelo Amoroso <carmelo.amoroso@st.com>2008-12-03 14:04:03 +0000
committerCarmelo Amoroso <carmelo.amoroso@st.com>2008-12-03 14:04:03 +0000
commitd5c32667ad11ff38dc46be527266297b38a341d1 (patch)
treeb3ce68f179d97e6e25e5c8e7ace845c4a561322b /libc/signal/sigintr.c
parent329ef3196b396a70eecd5a4789845d368b488ab7 (diff)
downloaduClibc-alpine-d5c32667ad11ff38dc46be527266297b38a341d1.tar.bz2
uClibc-alpine-d5c32667ad11ff38dc46be527266297b38a341d1.tar.xz
Synch with trunk @ 24242
Step 18: some more synch: hidden_proto, size reduction and signal handling changes.
Diffstat (limited to 'libc/signal/sigintr.c')
-rw-r--r--libc/signal/sigintr.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/libc/signal/sigintr.c b/libc/signal/sigintr.c
index 351c82b75..1a8d60eb2 100644
--- a/libc/signal/sigintr.c
+++ b/libc/signal/sigintr.c
@@ -34,7 +34,8 @@ int siginterrupt (int sig, int interrupt)
#ifdef SA_RESTART
struct sigaction action;
- if (sigaction (sig, (struct sigaction *) NULL, &action) < 0)
+ /* Fails if sig is bad. */
+ if (sigaction (sig, NULL, &action) < 0)
return -1;
if (interrupt)
@@ -48,10 +49,7 @@ int siginterrupt (int sig, int interrupt)
action.sa_flags |= SA_RESTART;
}
- if (sigaction (sig, &action, (struct sigaction *) NULL) < 0)
- return -1;
-
- return 0;
+ return sigaction (sig, &action, NULL);
#else
__set_errno (ENOSYS);
return -1;