From 9cf4f10609435bccd5fb32b979557a9e339563b6 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Fri, 5 Jan 2024 14:32:18 -0800 Subject: [NFC][tsan] `ptr != 0` to implicit check (#77144) --- compiler-rt/lib/tsan/rtl/tsan_report.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler-rt/lib/tsan/rtl/tsan_report.cpp b/compiler-rt/lib/tsan/rtl/tsan_report.cpp index 167e4be..cdcc20b 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_report.cpp +++ b/compiler-rt/lib/tsan/rtl/tsan_report.cpp @@ -274,13 +274,13 @@ static ReportStack *ChooseSummaryStack(const ReportDesc *rep) { } static bool FrameIsInternal(const SymbolizedStack *frame) { - if (frame == 0) + if (!frame) return false; const char *file = frame->info.file; const char *module = frame->info.module; - if (file != 0 && (internal_strstr(file, "/compiler-rt/lib/"))) + if (file && (internal_strstr(file, "/compiler-rt/lib/"))) return true; - if (module != 0 && (internal_strstr(module, "libclang_rt."))) + if (module && (internal_strstr(module, "libclang_rt."))) return true; return false; } -- cgit v1.1