From 0c3a5767d940a37b82ff33184f1999340c5a9f58 Mon Sep 17 00:00:00 2001 From: Kostya Serebryany Date: Tue, 29 Sep 2015 18:23:36 +0000 Subject: [sanitizer] Fix Clang-tidy modernize-use-nullptr warnings in lib/sanitizer_common headers, unify closing inclusion guards. Patch by Eugene Zelenko llvm-svn: 248816 --- compiler-rt/lib/sanitizer_common/sanitizer_lfstack.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'compiler-rt/lib/sanitizer_common/sanitizer_lfstack.h') diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_lfstack.h b/compiler-rt/lib/sanitizer_common/sanitizer_lfstack.h index 08841390808..879cc80921c 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_lfstack.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_lfstack.h @@ -49,8 +49,8 @@ struct LFStack { u64 cmp = atomic_load(&head_, memory_order_acquire); for (;;) { T *cur = (T*)(uptr)(cmp & kPtrMask); - if (cur == 0) - return 0; + if (!cur) + return nullptr; T *nxt = cur->next; u64 cnt = (cmp & kCounterMask); u64 xch = (u64)(uptr)nxt | cnt; @@ -68,6 +68,6 @@ struct LFStack { atomic_uint64_t head_; }; -} // namespace __sanitizer +} // namespace __sanitizer -#endif // #ifndef SANITIZER_LFSTACK_H +#endif // SANITIZER_LFSTACK_H -- cgit v1.2.3