From cd252ea74d569fa3f19cfc0385afe6335969cf8a Mon Sep 17 00:00:00 2001 From: Julien Charbon Date: Thu, 27 Aug 2015 10:43:35 +0000 Subject: [PATCH] Silent a compilation warning on callout_stop() --- sys/kern/kern_timeout.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c index e88c8316a1e..68c5eddeca4 100644 --- a/sys/kern/kern_timeout.c +++ b/sys/kern/kern_timeout.c @@ -1150,7 +1150,8 @@ _callout_stop_safe(struct callout *c, int safe) struct callout_cpu *cc, *old_cc; struct lock_class *class; int direct, sq_locked, use_lock; - int not_on_a_list, not_running; + int not_on_a_list; + int not_running = 1; if (safe) WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, c->c_lock, @@ -1385,8 +1386,7 @@ again: * and indeed impossible to stop then return 0. */ not_running = !(cc_exec_curr(cc, direct) == c); - } else - not_running = 1; + } CC_UNLOCK(cc); return (not_running);