Bug 201728

Summary: usr/src/usr.bin/ipcs/ipcs.c: 3 * bad if ?
Product: Base System Reporter: David Binderman <dcb314>
Component: miscAssignee: Andriy Voskoboinyk <avos>
Status: Closed FIXED    
Severity: Affects Only Me CC: avos
Priority: --- Flags: avos: mfc-stable12+
avos: mfc-stable11+
avos: mfc-stable10+
Version: 10.2-STABLE   
Hardware: Any   
OS: Any   

Description David Binderman 2015-07-21 06:59:26 UTC
1.

 [usr/src/usr.bin/ipcs/ipcs.c:227]: (style) Expression is always false because 'else if' condition matches previous condition at line 198.

Source code is

  if ((display & (MSGINFO | MSGTOTAL))) {
         ...
    } else
        if (display & (MSGINFO | MSGTOTAL)) {

2.

[usr/src/usr.bin/ipcs/ipcs.c:262]: (style) Expression is always false because 'else if' condition matches previous condition at line 234.

3.

[usr/src/usr.bin/ipcs/ipcs.c:299]: (style) Expression is always false because 'else if' condition matches previous condition at line 269.
Comment 1 commit-hook freebsd_committer freebsd_triage 2019-02-07 14:29:53 UTC
A commit references this bug:

Author: avos
Date: Thu Feb  7 14:29:46 UTC 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

Changes:
  head/usr.bin/ipcs/ipcs.c
Comment 2 commit-hook freebsd_committer freebsd_triage 2019-02-12 07:04:08 UTC
A commit references this bug:

Author: avos
Date: Tue Feb 12 07:03:38 UTC 2019
New revision: 344044
URL: https://svnweb.freebsd.org/changeset/base/344044

Log:
  MFC r343870:
  ipcs(1): drop obsolete error checking

  This code is unreachable since r77551.

  PR:		201728

Changes:
_U  stable/10/
  stable/10/usr.bin/ipcs/ipcs.c
_U  stable/11/
  stable/11/usr.bin/ipcs/ipcs.c
_U  stable/12/
  stable/12/usr.bin/ipcs/ipcs.c