summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d555992)
raw | patch | inline | side by side (parent: d555992)
author | Vincent Brillault <git@lerya.net> | |
Sat, 20 Sep 2014 16:49:57 +0000 (18:49 +0200) | ||
committer | Vincent Brillault <git@lerya.net> | |
Sat, 28 Feb 2015 06:35:41 +0000 (07:35 +0100) |
src/turbostat.c | patch | blob | history |
diff --git a/src/turbostat.c b/src/turbostat.c
index 0cf789e08ee948ceceb5c3bbc599301081a87df6..6995df55a550235a894f9576e848ad85d0c80e27 100644 (file)
--- a/src/turbostat.c
+++ b/src/turbostat.c
free(topology.cpus);
memset(&topology, 0, sizeof(topology));
- /* Can't fail (update_max_cpu_id always returns 0) */
- assert(for_all_proc_cpus(update_max_cpu_id));
+ ret = for_all_proc_cpus(update_max_cpu_id);
+ if (ret != 0)
+ goto err;
topology.cpus = calloc(1, (topology.max_cpu_id + 1) * sizeof(struct cpu_topology));
if (topology.cpus == NULL) {
if (ret != 0)
goto err;
- /* Can't fail (mark_cpu_present always returns 0) */
- assert(for_all_proc_cpus(mark_cpu_present));
+ ret = for_all_proc_cpus(mark_cpu_present);
+ if (ret != 0)
+ goto err;
/*
* For online cpus