aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--idlestat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/idlestat.c b/idlestat.c
index 8c3a01e..96ac38b 100644
--- a/idlestat.c
+++ b/idlestat.c
@@ -360,7 +360,7 @@ static struct init_pstates *build_init_pstates(struct cpu_topology *topo)
unsigned int *freqs;
nrcpus = sysconf(_SC_NPROCESSORS_CONF);
- if (nrcpus < 0)
+ if (nrcpus <= 0)
return NULL;
initp = calloc(sizeof(*initp), 1);