diff options
author | netchild <netchild@FreeBSD.org> | 2006-10-15 12:51:43 +0000 |
---|---|---|
committer | netchild <netchild@FreeBSD.org> | 2006-10-15 12:51:43 +0000 |
commit | 4afde074491866aae382433ba9266285f671d6fd (patch) | |
tree | 69d03ef84bb809d95241503c3a12444a0adbadb5 /sys/compat/linux/linux_signal.c | |
parent | e993001f4772b543b1d3bd464e443b9e6a586199 (diff) | |
download | FreeBSD-src-4afde074491866aae382433ba9266285f671d6fd.zip FreeBSD-src-4afde074491866aae382433ba9266285f671d6fd.tar.gz |
MFP4 (107868 - 107870):
Use a macro to test for a valid signal instead of doing it my hand everywhere.
Submitted by: rdivacky
Diffstat (limited to 'sys/compat/linux/linux_signal.c')
-rw-r--r-- | sys/compat/linux/linux_signal.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/compat/linux/linux_signal.c b/sys/compat/linux/linux_signal.c index 852c501..4a4ec12 100644 --- a/sys/compat/linux/linux_signal.c +++ b/sys/compat/linux/linux_signal.c @@ -144,7 +144,7 @@ linux_do_sigaction(struct thread *td, int linux_sig, l_sigaction_t *linux_nsa, struct sigaction act, oact, *nsa, *osa; int error, sig; - if (linux_sig <= 0 || linux_sig > LINUX_NSIG) + if (!LINUX_SIG_VALID(linux_sig)) return (EINVAL); osa = (linux_osa != NULL) ? &oact : NULL; @@ -438,7 +438,7 @@ linux_kill(struct thread *td, struct linux_kill_args *args) /* * Allow signal 0 as a means to check for privileges */ - if (args->signum < 0 || args->signum > LINUX_NSIG) + if (!LINUX_SIG_VALID(linux_sig) && args->signum != 0) return EINVAL; if (args->signum > 0 && args->signum <= LINUX_SIGTBLSZ) |