From a6682a413d893bc1ed6190dfadcee806155da66e Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Sat, 15 Dec 2018 00:15:33 +0000 Subject: 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 --- lldb/source/Host/macosx/objcxx/Host.mm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'lldb/source/Host/macosx/objcxx') 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(kinfo.kp_proc.p_pid) == our_pid || // Skip this process kinfo.kp_proc.p_pid == 0 || // Skip kernel (kernel pid is zero) -- cgit v1.2.3