fix off-by-one error in checks for implementation-internal signal numbers

This commit is contained in:
Rich Felker 2013-07-18 19:21:06 -04:00
parent b823ef2db1
commit 23815f88df
3 changed files with 3 additions and 3 deletions

View File

@ -4,7 +4,7 @@
int sigaddset(sigset_t *set, int sig)
{
unsigned s = sig-1;
if (s >= 8*sizeof(sigset_t) || s-32U<3) {
if (s >= 8*sizeof(sigset_t) || sig-32U<3) {
errno = EINVAL;
return -1;
}

View File

@ -4,7 +4,7 @@
int sigdelset(sigset_t *set, int sig)
{
unsigned s = sig-1;
if (s >= 8*sizeof(sigset_t) || s-32U<3) {
if (s >= 8*sizeof(sigset_t) || sig-32U<3) {
errno = EINVAL;
return -1;
}

View File

@ -4,7 +4,7 @@
int sigismember(const sigset_t *set, int sig)
{
unsigned s = sig-1;
if (s >= 8*sizeof(sigset_t) || s-32U<3) {
if (s >= 8*sizeof(sigset_t) || sig-32U<3) {
errno = EINVAL;
return -1;
}