diff --git a/src/system_wrappers/source/cpu_win.cc b/src/system_wrappers/source/cpu_win.cc index 134200a1d..2e6b56760 100644 --- a/src/system_wrappers/source/cpu_win.cc +++ b/src/system_wrappers/source/cpu_win.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -46,7 +46,7 @@ WebRtc_Word32 CpuWindows::CpuUsageMultiCore(WebRtc_UWord32& num_cores, { num_cores = 0; cpu_usage = NULL; - return 0; + return -1; } num_cores = number_of_objects_ - 1; cpu_usage = cpu_usage_; diff --git a/src/system_wrappers/source/cpu_wrapper_unittest.cc b/src/system_wrappers/source/cpu_wrapper_unittest.cc index dd49c3ac9..25e97cd75 100644 --- a/src/system_wrappers/source/cpu_wrapper_unittest.cc +++ b/src/system_wrappers/source/cpu_wrapper_unittest.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -42,7 +42,7 @@ TEST(CpuWrapperTest, Usage) { // Initializing the CPU measurements may take a couple of seconds on Windows. // Since the initialization is lazy we need to wait until it is completed. // Should not take more than 10000 ms. - while (cpu_usage_available && (++num_iterations < 10000)) { + while (!cpu_usage_available && (++num_iterations < 10000)) { if (cores != NULL) { ASSERT_GT(num_cores, 0u); break;