tsan: fix style

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