Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Feb 2019 14:29:46 +0000 (UTC)
From:      Andriy Voskoboinyk <avos@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r343870 - head/usr.bin/ipcs
Message-ID:  <201902071429.x17ETkhH055492@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avos
Date: Thu Feb  7 14:29:45 2019
New Revision: 343870
URL: https://svnweb.freebsd.org/changeset/base/343870

Log:
  ipcs(1): drop obsolete error checking
  
  This code is not reached since r77551.
  
  PR:		201728
  MFC after:	5 days

Modified:
  head/usr.bin/ipcs/ipcs.c

Modified: head/usr.bin/ipcs/ipcs.c
==============================================================================
--- head/usr.bin/ipcs/ipcs.c	Thu Feb  7 14:05:21 2019	(r343869)
+++ head/usr.bin/ipcs/ipcs.c	Thu Feb  7 14:29:45 2019	(r343870)
@@ -199,7 +199,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);
 
@@ -227,15 +227,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);
@@ -262,15 +257,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;
 
@@ -299,12 +289,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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902071429.x17ETkhH055492>