diff options
Diffstat (limited to 'lldb')
| -rw-r--r-- | lldb/include/lldb/lldb-versioning.h | 2 | ||||
| -rw-r--r-- | lldb/tools/debugserver/source/DNB.cpp | 7 | ||||
| -rw-r--r-- | lldb/tools/debugserver/source/RNBRemote.cpp | 4 |
3 files changed, 7 insertions, 6 deletions
diff --git a/lldb/include/lldb/lldb-versioning.h b/lldb/include/lldb/lldb-versioning.h index 8ccc67d8e9c..d0498a569f5 100644 --- a/lldb/include/lldb/lldb-versioning.h +++ b/lldb/include/lldb/lldb-versioning.h @@ -1604,4 +1604,4 @@ #define LLDB_API_DEPRECATED_IN_DOT_99 #endif // defined(LLDB_CHECK_API_VERSIONING) && defined(LLDB_API_MAJOR_VERSION_WANTED) && defined(LLDB_API_MINOR_VERSION_WANTED) && defined (LLDB_API_MAJOR_VERSION) -#endif // LLDB_lldb_versioning_h_
\ No newline at end of file +#endif // LLDB_lldb_versioning_h_ diff --git a/lldb/tools/debugserver/source/DNB.cpp b/lldb/tools/debugserver/source/DNB.cpp index d7955541f14..dd54c6a7b09 100644 --- a/lldb/tools/debugserver/source/DNB.cpp +++ b/lldb/tools/debugserver/source/DNB.cpp @@ -165,9 +165,10 @@ waitpid_thread (void *arg) static bool spawn_waitpid_thread (pid_t pid) { - pthread_t thread = THREAD_NULL; - ::pthread_create (&thread, NULL, waitpid_thread, (void *)(intptr_t)pid); - if (thread != THREAD_NULL) + pthread_t thread; + int ret = ::pthread_create (&thread, NULL, waitpid_thread, (void *)(intptr_t)pid); + // pthread_create returns 0 if successful + if (ret == 0) { ::pthread_detach (thread); return true; diff --git a/lldb/tools/debugserver/source/RNBRemote.cpp b/lldb/tools/debugserver/source/RNBRemote.cpp index 75ad9f395e5..6adf3de914b 100644 --- a/lldb/tools/debugserver/source/RNBRemote.cpp +++ b/lldb/tools/debugserver/source/RNBRemote.cpp @@ -815,7 +815,7 @@ best_guess_cpu_type () (end of string). */ std::vector<uint8_t> -decode_binary_data (const char *str, int len) +decode_binary_data (const char *str, size_t len) { std::vector<uint8_t> bytes; if (len == 0) @@ -1253,7 +1253,7 @@ RNBRemote::HandlePacket_A (const char *p) return HandlePacket_ILLFORMED (__FILE__, __LINE__, p, "Null packet for 'A' pkt"); } p++; - if (p == '\0' || !isdigit (*p)) + if (*p == '\0' || !isdigit (*p)) { return HandlePacket_ILLFORMED (__FILE__, __LINE__, p, "arglen not specified on 'A' pkt"); } |

