Date: Wed, 10 Feb 2016 21:16:37 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295488 - head/sys/kern Message-ID: <201602102116.u1ALGbv6093147@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Wed Feb 10 21:16:37 2016 New Revision: 295488 URL: https://svnweb.freebsd.org/changeset/base/295488 Log: 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 Modified: head/sys/kern/subr_turnstile.c Modified: head/sys/kern/subr_turnstile.c ============================================================================== --- head/sys/kern/subr_turnstile.c Wed Feb 10 20:49:22 2016 (r295487) +++ head/sys/kern/subr_turnstile.c Wed Feb 10 21:16:37 2016 (r295488) @@ -1026,8 +1026,7 @@ print_thread(struct thread *td, const ch { 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 */ 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, cons */ 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");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602102116.u1ALGbv6093147>