Skip to content

Commit 115eb0c

Browse files
committed
Remove unnecessary braces
1 parent bf8d52f commit 115eb0c

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

compiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -219,20 +219,19 @@ static void ReExecIfNeeded() {
219219
// Go maps shadow memory lazily and works fine with limited address space.
220220
// Unlimited stack is not a problem as well, because the executable
221221
// is not compiled with -pie.
222-
{
223-
bool reexec = false;
224-
// TSan doesn't play well with unlimited stack size (as stack
225-
// overlaps with shadow memory). If we detect unlimited stack size,
226-
// we re-exec the program with limited stack size as a best effort.
227-
if (StackSizeIsUnlimited()) {
228-
const uptr kMaxStackSize = 32 * 1024 * 1024;
229-
VReport(1,
230-
"Program is run with unlimited stack size, which wouldn't "
231-
"work with ThreadSanitizer.\n"
232-
"Re-execing with stack size limited to %zd bytes.\n",
233-
kMaxStackSize);
234-
SetStackSizeLimitInBytes(kMaxStackSize);
235-
reexec = true;
222+
bool reexec = false;
223+
// TSan doesn't play well with unlimited stack size (as stack
224+
// overlaps with shadow memory). If we detect unlimited stack size,
225+
// we re-exec the program with limited stack size as a best effort.
226+
if (StackSizeIsUnlimited()) {
227+
const uptr kMaxStackSize = 32 * 1024 * 1024;
228+
VReport(1,
229+
"Program is run with unlimited stack size, which wouldn't "
230+
"work with ThreadSanitizer.\n"
231+
"Re-execing with stack size limited to %zd bytes.\n",
232+
kMaxStackSize);
233+
SetStackSizeLimitInBytes(kMaxStackSize);
234+
reexec = true;
236235
}
237236

238237
if (!AddressSpaceIsUnlimited()) {
@@ -292,7 +291,6 @@ static void ReExecIfNeeded() {
292291

293292
if (reexec)
294293
ReExec();
295-
}
296294
}
297295
# endif
298296

0 commit comments

Comments
 (0)