[Lldb-commits] [lldb] c285297 - [lldb] Fix redundant condition in Target.cpp (#91882)
via lldb-commits
lldb-commits at lists.llvm.org
Tue May 14 01:14:21 PDT 2024
Author: aabhinavg
Date: 2024-05-14T09:14:17+01:00
New Revision: c28529788955dbfada9f8a5092432f09eec2c3ab
URL: https://github.com/llvm/llvm-project/commit/c28529788955dbfada9f8a5092432f09eec2c3ab
DIFF: https://github.com/llvm/llvm-project/commit/c28529788955dbfada9f8a5092432f09eec2c3ab.diff
LOG: [lldb] Fix redundant condition in Target.cpp (#91882)
This commit addresses issue #87244, where a redundant condition was
found in the Target.cpp file. Static analyzer cppcheck flagged the issue
in the Target.cpp file
fix #87244
Added:
Modified:
lldb/source/Target/Target.cpp
Removed:
################################################################################
diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp
index 82f3040e539a3..77731167995e1 100644
--- a/lldb/source/Target/Target.cpp
+++ b/lldb/source/Target/Target.cpp
@@ -841,7 +841,7 @@ static bool CheckIfWatchpointsSupported(Target *target, Status &error) {
if (!num_supported_hardware_watchpoints)
return true;
- if (num_supported_hardware_watchpoints == 0) {
+ if (*num_supported_hardware_watchpoints == 0) {
error.SetErrorStringWithFormat(
"Target supports (%u) hardware watchpoint slots.\n",
*num_supported_hardware_watchpoints);
More information about the lldb-commits
mailing list