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/source/Plugins/Process/MacOSX-Kernel | |
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/source/Plugins/Process/MacOSX-Kernel')
-rw-r--r-- | lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp index 7b22bec666e..8908108eff4 100644 --- a/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp +++ b/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp @@ -463,19 +463,13 @@ lldb_private::UUID CommunicationKDP::GetUUID() { bool CommunicationKDP::RemoteIsEFI() { if (GetKernelVersion() == NULL) return false; - if (strncmp(m_kernel_version.c_str(), "EFI", 3) == 0) - return true; - else - return false; + return strncmp(m_kernel_version.c_str(), "EFI", 3) == 0; } bool CommunicationKDP::RemoteIsDarwinKernel() { if (GetKernelVersion() == NULL) return false; - if (m_kernel_version.find("Darwin Kernel") != std::string::npos) - return true; - else - return false; + return m_kernel_version.find("Darwin Kernel") != std::string::npos; } lldb::addr_t CommunicationKDP::GetLoadAddress() { @@ -1258,9 +1252,7 @@ bool CommunicationKDP::SendRequestResume() { request_packet.PutHex32(GetCPUMask()); DataExtractor reply_packet; - if (SendRequestAndGetReply(command, request_packet, reply_packet)) - return true; - return false; + return SendRequestAndGetReply(command, request_packet, reply_packet); } bool CommunicationKDP::SendRequestBreakpoint(bool set, addr_t addr) { @@ -1293,7 +1285,5 @@ bool CommunicationKDP::SendRequestSuspend() { const uint32_t command_length = 8; MakeRequestPacketHeader(command, request_packet, command_length); DataExtractor reply_packet; - if (SendRequestAndGetReply(command, request_packet, reply_packet)) - return true; - return false; + return SendRequestAndGetReply(command, request_packet, reply_packet); } |