Bug 201728 - usr/src/usr.bin/ipcs/ipcs.c: 3 * bad if ?
Summary: usr/src/usr.bin/ipcs/ipcs.c: 3 * bad if ?
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: 10.2-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: Andriy Voskoboinyk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-21 06:59 UTC by David Binderman
Modified: 2019-02-12 07:05 UTC (History)
1 user (show)

See Also:
avos: mfc-stable10+
avos: mfc-stable11+
avos: mfc-stable12+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 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 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