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 /kernel/futex.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 'kernel/futex.c')
-rw-r--r-- | kernel/futex.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/futex.c b/kernel/futex.c index 7b54a672d0ad..c7130f86106c 100644 --- a/kernel/futex.c +++ b/kernel/futex.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/mount.h> | 39 | #include <linux/mount.h> |
40 | #include <linux/pagemap.h> | 40 | #include <linux/pagemap.h> |
41 | #include <linux/syscalls.h> | 41 | #include <linux/syscalls.h> |
42 | #include <linux/signal.h> | ||
42 | 43 | ||
43 | #define FUTEX_HASHBITS (CONFIG_BASE_SMALL ? 4 : 8) | 44 | #define FUTEX_HASHBITS (CONFIG_BASE_SMALL ? 4 : 8) |
44 | 45 | ||
@@ -654,7 +655,7 @@ static int futex_fd(unsigned long uaddr, int signal) | |||
654 | int ret, err; | 655 | int ret, err; |
655 | 656 | ||
656 | ret = -EINVAL; | 657 | ret = -EINVAL; |
657 | if (signal < 0 || signal > _NSIG) | 658 | if (!valid_signal(signal)) |
658 | goto out; | 659 | goto out; |
659 | 660 | ||
660 | ret = get_unused_fd(); | 661 | ret = get_unused_fd(); |