diff options
author | mpp <mpp@FreeBSD.org> | 1997-02-28 06:22:29 +0000 |
---|---|---|
committer | mpp <mpp@FreeBSD.org> | 1997-02-28 06:22:29 +0000 |
commit | d6d4380e84f41b1ec3d979438d54f3d0609b7d9b (patch) | |
tree | ccd28cfa27c90c1405917acf77b812e9fe22ceac /lib/libc/gen/sigsetops.c | |
parent | 0462a72737b50283565158dfef4b231018b5f6a8 (diff) | |
download | FreeBSD-src-d6d4380e84f41b1ec3d979438d54f3d0609b7d9b.zip FreeBSD-src-d6d4380e84f41b1ec3d979438d54f3d0609b7d9b.tar.gz |
The struct vfsconf element vfc_index is now vfs_typenum.
Diffstat (limited to 'lib/libc/gen/sigsetops.c')
-rw-r--r-- | lib/libc/gen/sigsetops.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/libc/gen/sigsetops.c b/lib/libc/gen/sigsetops.c index c3bd870..7e823a8 100644 --- a/lib/libc/gen/sigsetops.c +++ b/lib/libc/gen/sigsetops.c @@ -38,6 +38,7 @@ static char sccsid[] = "@(#)sigsetops.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ #include <signal.h> +#include <errno.h> #undef sigemptyset #undef sigfillset @@ -45,6 +46,8 @@ static char sccsid[] = "@(#)sigsetops.c 8.1 (Berkeley) 6/4/93"; #undef sigdelset #undef sigismember +#define SIGBAD(signo) ((signo) <= 0 || (signo) >= NSIG) + int sigemptyset(set) sigset_t *set; @@ -66,6 +69,10 @@ sigaddset(set, signo) sigset_t *set; int signo; { + if (SIGBAD(signo)) { + errno = EINVAL; + return -1; + } *set |= sigmask(signo); return (0); } @@ -75,6 +82,10 @@ sigdelset(set, signo) sigset_t *set; int signo; { + if (SIGBAD(signo)) { + errno = EINVAL; + return -1; + } *set &= ~sigmask(signo); return (0); } @@ -84,5 +95,9 @@ sigismember(set, signo) const sigset_t *set; int signo; { + if (SIGBAD(signo)) { + errno = EINVAL; + return -1; + } return ((*set & ~sigmask(signo)) != 0); } |