From d74831b3a043e4573226da84cb63a805a5c6bade Mon Sep 17 00:00:00 2001 From: avos Date: Tue, 12 Feb 2019 07:03:37 +0000 Subject: [PATCH] MFC r343870: ipcs(1): drop obsolete error checking This code is unreachable since r77551. PR: 201728 --- usr.bin/ipcs/ipcs.c | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/usr.bin/ipcs/ipcs.c b/usr.bin/ipcs/ipcs.c index 3d7be146dc0..269a957ac59 100644 --- a/usr.bin/ipcs/ipcs.c +++ b/usr.bin/ipcs/ipcs.c @@ -198,7 +198,7 @@ main(int argc, char *argv[]) } kget(X_MSGINFO, &msginfo, sizeof(msginfo)); - if ((display & (MSGINFO | MSGTOTAL))) { + if (display & (MSGINFO | MSGTOTAL)) { if (display & MSGTOTAL) print_kmsqtotal(msginfo); @@ -226,15 +226,10 @@ main(int argc, char *argv[]) printf("\n"); } - } else - if (display & (MSGINFO | MSGTOTAL)) { - fprintf(stderr, - "SVID messages facility " - "not configured in the system\n"); - } + } kget(X_SHMINFO, &shminfo, sizeof(shminfo)); - if ((display & (SHMINFO | SHMTOTAL))) { + if (display & (SHMINFO | SHMTOTAL)) { if (display & SHMTOTAL) print_kshmtotal(shminfo); @@ -261,15 +256,10 @@ main(int argc, char *argv[]) } printf("\n"); } - } else - if (display & (SHMINFO | SHMTOTAL)) { - fprintf(stderr, - "SVID shared memory facility " - "not configured in the system\n"); - } + } kget(X_SEMINFO, &seminfo, sizeof(seminfo)); - if ((display & (SEMINFO | SEMTOTAL))) { + if (display & (SEMINFO | SEMTOTAL)) { struct semid_kernel *kxsema; size_t kxsema_len; @@ -298,12 +288,7 @@ main(int argc, char *argv[]) printf("\n"); } - } else - if (display & (SEMINFO | SEMTOTAL)) { - fprintf(stderr, - "SVID semaphores facility " - "not configured in the system\n"); - } + } if (!use_sysctl) kvm_close(kd); -- 2.45.0