=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/systat/cpu.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- src/usr.bin/systat/cpu.c 2018/11/17 23:10:08 1.9 +++ src/usr.bin/systat/cpu.c 2019/06/28 13:35:04 1.10 @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.9 2018/11/17 23:10:08 cheloha Exp $ */ +/* $OpenBSD: cpu.c,v 1.10 2019/06/28 13:35:04 deraadt Exp $ */ /* * Copyright (c) 2013 Reyk Floeter @@ -154,7 +154,7 @@ for (i = 0; i < cpu_count; i++) { cpustats_mib[2] = i; tmpstate = cpu_states + (CPUSTATES * i); - if (sysctl(cpustats_mib, 3, &cpu_tm[i], &size, NULL, 0) < 0) + if (sysctl(cpustats_mib, 3, &cpu_tm[i], &size, NULL, 0) == -1) error("sysctl KERN_CPUSTATS"); percentages(CPUSTATES, tmpstate, cpu_tm[i].cs_time, cpu_old[i].cs_time, cpu_diff[i].cs_time);