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 /fs | |
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 'fs')
-rw-r--r-- | fs/fcntl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/fcntl.c b/fs/fcntl.c index 3e7ab16ed154..286a9f8f3d49 100644 --- a/fs/fcntl.c +++ b/fs/fcntl.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/security.h> | 16 | #include <linux/security.h> |
17 | #include <linux/ptrace.h> | 17 | #include <linux/ptrace.h> |
18 | #include <linux/signal.h> | ||
18 | 19 | ||
19 | #include <asm/poll.h> | 20 | #include <asm/poll.h> |
20 | #include <asm/siginfo.h> | 21 | #include <asm/siginfo.h> |
@@ -308,7 +309,7 @@ static long do_fcntl(int fd, unsigned int cmd, unsigned long arg, | |||
308 | break; | 309 | break; |
309 | case F_SETSIG: | 310 | case F_SETSIG: |
310 | /* arg == 0 restores default behaviour. */ | 311 | /* arg == 0 restores default behaviour. */ |
311 | if (arg < 0 || arg > _NSIG) { | 312 | if (!valid_signal(arg)) { |
312 | break; | 313 | break; |
313 | } | 314 | } |
314 | err = 0; | 315 | err = 0; |