Index: bin/ps/ps.c =================================================================== --- bin/ps/ps.c +++ bin/ps/ps.c @@ -523,7 +523,7 @@ */ nentries = -1; kp = kvm_getprocs(kd, what, flag, &nentries); - if ((kp == NULL && nentries > 0) || (kp != NULL && nentries < 0)) + if (kp == NULL || (kp != NULL && nentries < 0)) xo_errx(1, "%s", kvm_geterr(kd)); nkept = 0; if (nentries > 0) {