diff options
-rw-r--r-- | hardinfo2/benchmark.c | 4 | ||||
-rw-r--r-- | hardinfo2/devices.c | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/hardinfo2/benchmark.c b/hardinfo2/benchmark.c index c0928305..1efe34ba 100644 --- a/hardinfo2/benchmark.c +++ b/hardinfo2/benchmark.c @@ -97,9 +97,9 @@ gdouble benchmark_parallel_for(guint start, guint end, timer = g_timer_new(); temp = module_call_method("devices::getProcessorCount"); - n_cores = temp ? 1 : atoi(temp); + n_cores = temp ? atoi(temp) : 1; g_free(temp); - + iter_per_core = (end - start) / n_cores; DEBUG("processor has %d cores; processing %d elements (%d per core)", diff --git a/hardinfo2/devices.c b/hardinfo2/devices.c index 4f88d71e..e4a2fa7b 100644 --- a/hardinfo2/devices.c +++ b/hardinfo2/devices.c @@ -167,6 +167,7 @@ gchar *get_input_devices(void) gchar *get_processor_count(void) { + scan_processors(FALSE); return g_strdup_printf("%d", g_slist_length(processors)); } |