Browse Source

sigset_t is unsigned, so eliminate a warning by shifting a 1U instead

of a 1 when creating signal masks.
ok millert@
OPENBSD_5_0
guenther 13 years ago
parent
commit
9c09f464a8
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      src/include/signal.h

+ 4
- 4
src/include/signal.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: signal.h,v 1.14 2010/10/01 20:10:24 guenther Exp $ */
/* $OpenBSD: signal.h,v 1.15 2011/07/06 17:39:22 guenther Exp $ */
/* $NetBSD: signal.h,v 1.8 1996/02/29 00:04:57 jtc Exp $ */
/*-
@ -71,7 +71,7 @@ __only_inline int sigaddset(sigset_t *set, int signo) {
*__errno() = 22; /* EINVAL */
return -1;
}
*set |= (1 << ((signo)-1)); /* sigmask(signo) */
*set |= (1U << ((signo)-1)); /* sigmask(signo) */
return (0);
}
@ -82,7 +82,7 @@ __only_inline int sigdelset(sigset_t *set, int signo) {
*__errno() = 22; /* EINVAL */
return -1;
}
*set &= ~(1 << ((signo)-1)); /* sigmask(signo) */
*set &= ~(1U << ((signo)-1)); /* sigmask(signo) */
return (0);
}
@ -93,7 +93,7 @@ __only_inline int sigismember(const sigset_t *set, int signo) {
*__errno() = 22; /* EINVAL */
return -1;
}
return ((*set & (1 << ((signo)-1))) != 0);
return ((*set & (1U << ((signo)-1))) != 0);
}
#endif /* !_ANSI_LIBRARY && !lint */


Loading…
Cancel
Save