From a170f081092b7d1ad966e5cc57c0b18a54778642 Mon Sep 17 00:00:00 2001 From: Richard Trieu Date: Wed, 26 Feb 2014 03:12:51 +0000 Subject: [PATCH] Remove 'tctx->name' from a logical statement since it is a pointer and always is converted to a true value. Detected by Clang's improved -Wbool-conversion llvm-svn: 202223 --- .../sanitizer_common/tests/sanitizer_thread_registry_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler-rt/lib/sanitizer_common/tests/sanitizer_thread_registry_test.cc b/compiler-rt/lib/sanitizer_common/tests/sanitizer_thread_registry_test.cc index ddc8dba5d3e0..69b6e13e7210 100644 --- a/compiler-rt/lib/sanitizer_common/tests/sanitizer_thread_registry_test.cc +++ b/compiler-rt/lib/sanitizer_common/tests/sanitizer_thread_registry_test.cc @@ -48,7 +48,7 @@ static uptr get_uid(u32 tid) { static bool HasName(ThreadContextBase *tctx, void *arg) { char *name = (char*)arg; - return (tctx->name && 0 == internal_strcmp(tctx->name, name)); + return (0 == internal_strcmp(tctx->name, name)); } static bool HasUid(ThreadContextBase *tctx, void *arg) { -- GitLab