diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2018-12-15 00:15:33 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2018-12-15 00:15:33 +0000 |
commit | a6682a413d893bc1ed6190dfadcee806155da66e (patch) | |
tree | 326b3a6e484e3a3a3a5087663e1284f9b594f2a8 /lldb/tools/debugserver/source/RNBRemote.cpp | |
parent | 9d1827331f3f9582fa2ed05913ae4301f2604a19 (diff) | |
download | bcm5719-llvm-a6682a413d893bc1ed6190dfadcee806155da66e.tar.gz bcm5719-llvm-a6682a413d893bc1ed6190dfadcee806155da66e.zip |
Simplify Boolean expressions
This patch simplifies boolean expressions acorss LLDB. It was generated
using clang-tidy with the following command:
run-clang-tidy.py -checks='-*,readability-simplify-boolean-expr' -format -fix $PWD
Differential revision: https://reviews.llvm.org/D55584
llvm-svn: 349215
Diffstat (limited to 'lldb/tools/debugserver/source/RNBRemote.cpp')
-rw-r--r-- | lldb/tools/debugserver/source/RNBRemote.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lldb/tools/debugserver/source/RNBRemote.cpp b/lldb/tools/debugserver/source/RNBRemote.cpp index bfcd799f131..c8ef153fcb4 100644 --- a/lldb/tools/debugserver/source/RNBRemote.cpp +++ b/lldb/tools/debugserver/source/RNBRemote.cpp @@ -3413,10 +3413,7 @@ static bool RNBRemoteShouldCancelCallback(void *not_used) { RNBRemoteSP remoteSP(g_remoteSP); if (remoteSP.get() != NULL) { RNBRemote *remote = remoteSP.get(); - if (remote->Comm().IsConnected()) - return false; - else - return true; + return !remote->Comm().IsConnected(); } return true; } @@ -3817,7 +3814,7 @@ rnb_err_t RNBRemote::HandlePacket_v(const char *p) { attach_failed_due_to_sip = true; } - if (attach_failed_due_to_sip == false) { + if (!attach_failed_due_to_sip) { int csops_flags = 0; int retval = ::csops(pid_attaching_to, CS_OPS_STATUS, &csops_flags, sizeof(csops_flags)); @@ -5300,7 +5297,7 @@ RNBRemote::GetJSONThreadsInfo(bool threads_with_valid_stop_info_only) { thread_dict_sp->AddStringItem("reason", reason_value); - if (threads_with_valid_stop_info_only == false) { + if (!threads_with_valid_stop_info_only) { const char *thread_name = DNBThreadGetName(pid, tid); if (thread_name && thread_name[0]) thread_dict_sp->AddStringItem("name", thread_name); @@ -5488,7 +5485,7 @@ rnb_err_t RNBRemote::HandlePacket_jThreadExtendedInfo(const char *p) { bool need_to_print_comma = false; - if (thread_activity_sp && timed_out == false) { + if (thread_activity_sp && !timed_out) { const Genealogy::Activity *activity = &thread_activity_sp->current_activity; bool need_vouchers_comma_sep = false; |