=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ipcs/ipcs.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- src/usr.bin/ipcs/ipcs.c 2015/01/16 06:40:08 1.26 +++ src/usr.bin/ipcs/ipcs.c 2019/06/28 13:35:01 1.27 @@ -1,4 +1,4 @@ -/* $OpenBSD: ipcs.c,v 1.26 2015/01/16 06:40:08 deraadt Exp $ */ +/* $OpenBSD: ipcs.c,v 1.27 2019/06/28 13:35:01 deraadt Exp $ */ /* $NetBSD: ipcs.c,v 1.25 2000/06/16 03:58:20 simonb Exp $ */ /*- @@ -448,7 +448,7 @@ mib[0] = CTL_KERN; mib[1] = KERN_SYSVMSG; len = sizeof(valid); - if (sysctl(mib, 2, &valid, &len, NULL, 0) < 0) { + if (sysctl(mib, 2, &valid, &len, NULL, 0) == -1) { warn("sysctl(KERN_SYSVMSG)"); return; } @@ -465,7 +465,7 @@ /* totals only */ len = sizeof(struct msginfo); } else { - if (sysctl(mib, 3, NULL, &len, NULL, 0) < 0) { + if (sysctl(mib, 3, NULL, &len, NULL, 0) == -1) { warn("sysctl(KERN_SYSVIPC_MSG_INFO)"); return; } @@ -474,7 +474,7 @@ if ((buf = malloc(len)) == NULL) err(1, "malloc"); msgsi = (struct msg_sysctl_info *)buf; - if (sysctl(mib, 3, msgsi, &len, NULL, 0) < 0) { + if (sysctl(mib, 3, msgsi, &len, NULL, 0) == -1) { warn("sysctl(KERN_SYSVIPC_MSG_INFO)"); return; } @@ -519,7 +519,7 @@ mib[0] = CTL_KERN; mib[1] = KERN_SYSVSHM; len = sizeof(valid); - if (sysctl(mib, 2, &valid, &len, NULL, 0) < 0) { + if (sysctl(mib, 2, &valid, &len, NULL, 0) == -1) { warn("sysctl(KERN_SYSVSHM)"); return; } @@ -537,7 +537,7 @@ /* totals only */ len = sizeof(struct shminfo); } else { - if (sysctl(mib, 3, NULL, &len, NULL, 0) < 0) { + if (sysctl(mib, 3, NULL, &len, NULL, 0) == -1) { warn("sysctl(KERN_SYSVIPC_SHM_INFO)"); return; } @@ -546,7 +546,7 @@ if ((buf = malloc(len)) == NULL) err(1, "malloc"); shmsi = (struct shm_sysctl_info *)buf; - if (sysctl(mib, 3, shmsi, &len, NULL, 0) < 0) { + if (sysctl(mib, 3, shmsi, &len, NULL, 0) == -1) { warn("sysctl(KERN_SYSVIPC_SHM_INFO)"); return; } @@ -590,7 +590,7 @@ mib[0] = CTL_KERN; mib[1] = KERN_SYSVSEM; len = sizeof(valid); - if (sysctl(mib, 2, &valid, &len, NULL, 0) < 0) { + if (sysctl(mib, 2, &valid, &len, NULL, 0) == -1) { warn("sysctl(KERN_SYSVSEM)"); return; } @@ -608,7 +608,7 @@ /* totals only */ len = sizeof(struct seminfo); } else { - if (sysctl(mib, 3, NULL, &len, NULL, 0) < 0) { + if (sysctl(mib, 3, NULL, &len, NULL, 0) == -1) { warn("sysctl(KERN_SYSVIPC_SEM_INFO)"); return; } @@ -617,7 +617,7 @@ if ((buf = malloc(len)) == NULL) err(1, "malloc"); semsi = (struct sem_sysctl_info *)buf; - if (sysctl(mib, 3, semsi, &len, NULL, 0) < 0) { + if (sysctl(mib, 3, semsi, &len, NULL, 0) == -1) { warn("sysctl(KERN_SYSVIPC_SEM_INFO)"); return; }