Skip to content

Commit 30bfab3

Browse files
authored
[lldb] Remove redundant condition in watch mask check (NFC) (#94842)
This issue is reported by cppcheck as a pointless test in the watch mask check. The `else if` condition is opposite to the previous `if` condition, making the expression always true. Caught by cppcheck - lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp:509:25: style: Expression is always true because 'else if' condition is opposite to previous condition at line 505. [multiCondition] Fix #91223
1 parent 0af2e75 commit 30bfab3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ uint32_t NativeRegisterContextLinux_arm::SetHardwareWatchpoint(
506506
return LLDB_INVALID_INDEX32;
507507
else if (watch_mask <= 0x02)
508508
size = 2;
509-
else if (watch_mask <= 0x04)
509+
else
510510
size = 4;
511511

512512
addr = addr & (~0x03);

0 commit comments

Comments
 (0)