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/Host/macosx/objcxx | |
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/Host/macosx/objcxx')
-rw-r--r-- | lldb/source/Host/macosx/objcxx/Host.mm | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lldb/source/Host/macosx/objcxx/Host.mm b/lldb/source/Host/macosx/objcxx/Host.mm index ec876837d59..18f2a53e565 100644 --- a/lldb/source/Host/macosx/objcxx/Host.mm +++ b/lldb/source/Host/macosx/objcxx/Host.mm @@ -486,11 +486,9 @@ static bool GetMacOSXProcessCPUType(ProcessInstanceInfo &process_info) { bool host_cpu_is_64bit; uint32_t is64bit_capable; size_t is64bit_capable_len = sizeof(is64bit_capable); - if (sysctlbyname("hw.cpu64bit_capable", &is64bit_capable, - &is64bit_capable_len, NULL, 0) == 0) - host_cpu_is_64bit = true; - else - host_cpu_is_64bit = false; + host_cpu_is_64bit = + sysctlbyname("hw.cpu64bit_capable", &is64bit_capable, + &is64bit_capable_len, NULL, 0) == 0; // if the host is an armv8 device, its cpusubtype will be in // CPU_SUBTYPE_ARM64 numbering @@ -660,7 +658,7 @@ uint32_t Host::FindProcesses(const ProcessInstanceInfoMatch &match_info, if (our_uid == 0) kinfo_user_matches = true; - if (kinfo_user_matches == false || // Make sure the user is acceptable + if (!kinfo_user_matches || // Make sure the user is acceptable static_cast<lldb::pid_t>(kinfo.kp_proc.p_pid) == our_pid || // Skip this process kinfo.kp_proc.p_pid == 0 || // Skip kernel (kernel pid is zero) |