summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2003-04-01 09:07:36 +0000
committerjeff <jeff@FreeBSD.org>2003-04-01 09:07:36 +0000
commit3c4f704ebe5e5ef071af9d341b8323255e6f7aca (patch)
tree88d1490d4e7ac613c9ead929aff8b97d24b970cb /sys/kern
parent81a4ff8159411c2473e8e759c33e6e11fbb17b31 (diff)
downloadFreeBSD-src-3c4f704ebe5e5ef071af9d341b8323255e6f7aca.zip
FreeBSD-src-3c4f704ebe5e5ef071af9d341b8323255e6f7aca.tar.gz
- p will be unused in cursig() if INVARIANTS is not defined. Access it
through td->td_proc to avoid the unused variable. Spotted by: Maxim Konovalov <maxim@macomnet.ru>
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_sig.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index 116a610..65a07d0 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -181,9 +181,7 @@ static int sigproptbl[NSIG] = {
int
cursig(struct thread *td)
{
- struct proc *p = td->td_proc;
-
- PROC_LOCK_ASSERT(p, MA_OWNED);
+ PROC_LOCK_ASSERT(td->td_proc, MA_OWNED);
mtx_assert(&sched_lock, MA_NOTOWNED);
return (SIGPENDING(td) ? issignal(td) : 0);
}
OpenPOWER on IntegriCloud