diff --git a/system_wrappers/source/cpu_info.cc b/system_wrappers/source/cpu_info.cc index 7288c67efd..eff720371a 100644 --- a/system_wrappers/source/cpu_info.cc +++ b/system_wrappers/source/cpu_info.cc @@ -32,7 +32,7 @@ static int DetectNumberOfCores() { number_of_cores = static_cast(si.dwNumberOfProcessors); #elif defined(WEBRTC_LINUX) || defined(WEBRTC_ANDROID) number_of_cores = static_cast(sysconf(_SC_NPROCESSORS_ONLN)); - if (number_of_cores < 0) { + if (number_of_cores <= 0) { RTC_LOG(LS_ERROR) << "Failed to get number of cores"; number_of_cores = 1; }