summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_synch.c
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2009-02-26 15:51:54 +0000
committered <ed@FreeBSD.org>2009-02-26 15:51:54 +0000
commitb3ddcfe1f75495bb47bf5eaba6333e4822eadae7 (patch)
treed89376ead0217f0b0f64e8d12308efc93860e35a /sys/kern/kern_synch.c
parentfb70a002f2760a40274da9dacaa3edd815884665 (diff)
downloadFreeBSD-src-b3ddcfe1f75495bb47bf5eaba6333e4822eadae7.zip
FreeBSD-src-b3ddcfe1f75495bb47bf5eaba6333e4822eadae7.tar.gz
Remove even more unneeded variable assignments.
kern_time.c: - Unused variable `p'. kern_thr.c: - Variable `error' is always caught immediately, so no reason to initialize it. There is no way that error != 0 at the end of create_thread(). kern_sig.c: - Unused variable `code'. kern_synch.c: - `rval' is always assigned in all different cases. kern_rwlock.c: - `v' is always overwritten with RW_UNLOCKED further on. kern_malloc.c: - `size' is always initialized with the proper value before being used. kern_exit.c: - `error' is always caught and returned immediately. abort2() never returns a non-zero value. kern_exec.c: - `len' is always assigned inside the if-statement right below it. tty_info.c: - `td' is always overwritten by FOREACH_THREAD_IN_PROC(). Found by: LLVM's scan-build
Diffstat (limited to 'sys/kern/kern_synch.c')
-rw-r--r--sys/kern/kern_synch.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c
index bc539af..b91c1a5 100644
--- a/sys/kern/kern_synch.c
+++ b/sys/kern/kern_synch.c
@@ -173,7 +173,6 @@ _sleep(void *ident, struct lock_object *lock, int priority,
}
catch = priority & PCATCH;
pri = priority & PRIMASK;
- rval = 0;
/*
* If we are already on a sleep queue, then remove us from that
OpenPOWER on IntegriCloud