diff options
author | Jesper Juhl <juhl-lkml@dif.dk> | 2005-05-01 11:59:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-01 11:59:14 -0400 |
commit | 7ed20e1ad521b5f5df61bf6559ae60738e393741 (patch) | |
tree | 90931724e45eaedb3445314e8b94e78253642395 /ipc/mqueue.c | |
parent | e5bdd883a189243541e7a132385580703b049102 (diff) |
[PATCH] convert that currently tests _NSIG directly to use valid_signal()
Convert most of the current code that uses _NSIG directly to instead use
valid_signal(). This avoids gcc -W warnings and off-by-one errors.
Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'ipc/mqueue.c')
-rw-r--r-- | ipc/mqueue.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ipc/mqueue.c b/ipc/mqueue.c index 33f71520b89c..0acf245f441d 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/skbuff.h> | 23 | #include <linux/skbuff.h> |
24 | #include <linux/netlink.h> | 24 | #include <linux/netlink.h> |
25 | #include <linux/syscalls.h> | 25 | #include <linux/syscalls.h> |
26 | #include <linux/signal.h> | ||
26 | #include <net/sock.h> | 27 | #include <net/sock.h> |
27 | #include "util.h" | 28 | #include "util.h" |
28 | 29 | ||
@@ -976,8 +977,7 @@ asmlinkage long sys_mq_notify(mqd_t mqdes, | |||
976 | notification.sigev_notify != SIGEV_THREAD)) | 977 | notification.sigev_notify != SIGEV_THREAD)) |
977 | return -EINVAL; | 978 | return -EINVAL; |
978 | if (notification.sigev_notify == SIGEV_SIGNAL && | 979 | if (notification.sigev_notify == SIGEV_SIGNAL && |
979 | (notification.sigev_signo < 0 || | 980 | !valid_signal(notification.sigev_signo)) { |
980 | notification.sigev_signo > _NSIG)) { | ||
981 | return -EINVAL; | 981 | return -EINVAL; |
982 | } | 982 | } |
983 | if (notification.sigev_notify == SIGEV_THREAD) { | 983 | if (notification.sigev_notify == SIGEV_THREAD) { |