diff options
author | Greg Clayton <gclayton@apple.com> | 2012-07-17 03:23:13 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2012-07-17 03:23:13 +0000 |
commit | 23f59509a8790b04c691ec063c55724a3bfee7eb (patch) | |
tree | 9bd1537b53423b7a43ccd4b9bceb178960bbbb02 /lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp | |
parent | 24a8378c4f5ab46f9156e8c271500a6e051c2fd4 (diff) | |
download | bcm5719-llvm-23f59509a8790b04c691ec063c55724a3bfee7eb.tar.gz bcm5719-llvm-23f59509a8790b04c691ec063c55724a3bfee7eb.zip |
Ran the static analyzer on the codebase and found a few things.
llvm-svn: 160338
Diffstat (limited to 'lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp')
-rw-r--r-- | lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp b/lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp index b8044fe6c7f..8e35069fd8a 100644 --- a/lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp +++ b/lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp @@ -470,9 +470,9 @@ MachThreadList::DisableHardwareBreakpoint (const DNBBreakpoint* bp) const uint32_t MachThreadList::EnableHardwareWatchpoint (const DNBBreakpoint* wp) const { + uint32_t hw_index = INVALID_NUB_HW_INDEX; if (wp != NULL) { - uint32_t hw_index; PTHREAD_MUTEX_LOCKER (locker, m_threads_mutex); const uint32_t num_threads = m_threads.size(); for (uint32_t idx = 0; idx < num_threads; ++idx) @@ -492,9 +492,8 @@ MachThreadList::EnableHardwareWatchpoint (const DNBBreakpoint* wp) const // Use an arbitrary thread to signal the completion of our transaction. if (num_threads) m_threads[0]->HardwareWatchpointStateChanged(); - return hw_index; } - return INVALID_NUB_HW_INDEX; + return hw_index; } bool |