From 86a448c3a4bd5d826a6d91d06ef4143c0a8dd207 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Wed, 10 Feb 2016 21:16:37 +0000 Subject: [PATCH] Finish r173600. There is no need to test a condition if both cases result in the same value. Found by: PVS-Studio Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/kern/subr_turnstile.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sys/kern/subr_turnstile.c b/sys/kern/subr_turnstile.c index 7765cbf68c64..57d9f0975d14 100644 --- a/sys/kern/subr_turnstile.c +++ b/sys/kern/subr_turnstile.c @@ -1026,8 +1026,7 @@ print_thread(struct thread *td, const char *prefix) { db_printf("%s%p (tid %d, pid %d, \"%s\")\n", prefix, td, td->td_tid, - td->td_proc->p_pid, td->td_name[0] != '\0' ? td->td_name : - td->td_name); + td->td_proc->p_pid, td->td_name); } static void @@ -1109,8 +1108,7 @@ print_lockchain(struct thread *td, const char *prefix) */ while (!db_pager_quit) { db_printf("%sthread %d (pid %d, %s) ", prefix, td->td_tid, - td->td_proc->p_pid, td->td_name[0] != '\0' ? td->td_name : - td->td_name); + td->td_proc->p_pid, td->td_name); switch (td->td_state) { case TDS_INACTIVE: db_printf("is inactive\n"); @@ -1193,8 +1191,7 @@ print_sleepchain(struct thread *td, const char *prefix) */ while (!db_pager_quit) { db_printf("%sthread %d (pid %d, %s) ", prefix, td->td_tid, - td->td_proc->p_pid, td->td_name[0] != '\0' ? td->td_name : - td->td_name); + td->td_proc->p_pid, td->td_name); switch (td->td_state) { case TDS_INACTIVE: db_printf("is inactive\n");