[compiler-rt] r202223 - Remove 'tctx->name' from a logical statement since it is a pointer and always
Richard Trieu
rtrieu at google.com
Tue Feb 25 19:12:51 PST 2014
Author: rtrieu
Date: Tue Feb 25 21:12:51 2014
New Revision: 202223
URL: http://llvm.org/viewvc/llvm-project?rev=202223&view=rev
Log:
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
Modified:
compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_thread_registry_test.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_thread_registry_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_thread_registry_test.cc?rev=202223&r1=202222&r2=202223&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_thread_registry_test.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_thread_registry_test.cc Tue Feb 25 21:12:51 2014
@@ -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) {
More information about the llvm-commits
mailing list