tsan: fix style

Usually we roll the variable declaration into the condition in cases like this.

llvm-svn: 224755
This commit is contained in:
Dmitry Vyukov 2014-12-23 07:21:23 +00:00
parent 4553bff412
commit 10070626b7
1 changed files with 2 additions and 3 deletions

View File

@ -251,9 +251,8 @@ ThreadContext *IsThreadStackOrTls(uptr addr, bool *is_stack) {
void ScopedReport::AddThread(int unique_tid, bool suppressable) {
#ifndef SANITIZER_GO
const ThreadContext *tctx = FindThreadByUidLocked(unique_tid);
if (tctx)
AddThread(FindThreadByUidLocked(unique_tid), suppressable);
if (const ThreadContext *tctx = FindThreadByUidLocked(unique_tid))
AddThread(tctx, suppressable);
#endif
}