summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrofl0r <retnyg@gmx.net>2012-12-06 22:14:37 +0100
committerrofl0r <retnyg@gmx.net>2012-12-06 22:14:37 +0100
commit30d2c1f5bf68183e6361c5dfa812c6e42a8ec78c (patch)
tree7cb32c8bae1bf1ab6b3254e93fc480527b68b271 /src
parent4ab26cc34c48a3374c54735a5df0bed106fda06e (diff)
downloadmusl-30d2c1f5bf68183e6361c5dfa812c6e42a8ec78c.tar.gz
musl-30d2c1f5bf68183e6361c5dfa812c6e42a8ec78c.tar.bz2
musl-30d2c1f5bf68183e6361c5dfa812c6e42a8ec78c.tar.xz
musl-30d2c1f5bf68183e6361c5dfa812c6e42a8ec78c.zip
sigandset/sigorset: do not check for NULL pointers.
that way it's consistent with existing sig* functions, and saves some code size.
Diffstat (limited to 'src')
-rw-r--r--src/signal/sigandset.c5
-rw-r--r--src/signal/sigorset.c5
2 files changed, 0 insertions, 10 deletions
diff --git a/src/signal/sigandset.c b/src/signal/sigandset.c
index 78f9600d..f9204c49 100644
--- a/src/signal/sigandset.c
+++ b/src/signal/sigandset.c
@@ -1,15 +1,10 @@
#define _GNU_SOURCE
#include <signal.h>
-#include <errno.h>
#define SST_SIZE (_NSIG/8)
int sigandset(sigset_t *dest, sigset_t *left, sigset_t *right)
{
- if(!dest || !left || !right) {
- errno = EINVAL;
- return -1;
- }
unsigned long i = 0, *d = (void*) dest, *l = (void*) left, *r = (void*) right;
for(; i < SST_SIZE; i++) d[i] = l[i] & r[i];
return 0;
diff --git a/src/signal/sigorset.c b/src/signal/sigorset.c
index eb5feab4..5460224b 100644
--- a/src/signal/sigorset.c
+++ b/src/signal/sigorset.c
@@ -1,15 +1,10 @@
#define _GNU_SOURCE
#include <signal.h>
-#include <errno.h>
#define SST_SIZE (_NSIG/8)
int sigorset(sigset_t *dest, sigset_t *left, sigset_t *right)
{
- if(!dest || !left || !right) {
- errno = EINVAL;
- return -1;
- }
unsigned long i = 0, *d = (void*) dest, *l = (void*) left, *r = (void*) right;
for(; i < SST_SIZE; i++) d[i] = l[i] | r[i];
return 0;