Bug 200983 - sbin/newfs_nandfs/newfs_nandfs.c:900: bad if test ?
Summary: sbin/newfs_nandfs/newfs_nandfs.c:900: bad if test ?
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: 10.1-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-20 08:23 UTC by David Binderman
Modified: 2015-07-13 13:03 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Binderman 2015-06-20 08:23:32 UTC
/sbin/newfs_nandfs/newfs_nandfs.c:900]:
 (warning) Logical conjunction always evaluates to false: rsv_segment_percent < 
1 && rsv_segment_percent > 99.

   if ((rsv_segment_percent < 1) && (rsv_segment_percent > 99))

Maybe

   if ((rsv_segment_percent < 1) || (rsv_segment_percent > 99))
Comment 1 commit-hook freebsd_committer freebsd_triage 2015-07-02 12:15:17 UTC
A commit references this bug:

Author: brueffer
Date: Thu Jul  2 12:14:49 UTC 2015
New revision: 285029
URL: https://svnweb.freebsd.org/changeset/base/285029

Log:
  Fix an obviously wrong boolean operator.

  PR:		200983
  Submitted by:	David Bindeman
  MFC after:	1 week

Changes:
  head/sbin/newfs_nandfs/newfs_nandfs.c
Comment 2 Christian Brueffer freebsd_committer freebsd_triage 2015-07-02 12:16:08 UTC
Fixed in HEAD, merge to the STABLE branches to follow.  Thanks!
Comment 3 commit-hook freebsd_committer freebsd_triage 2015-07-13 13:02:52 UTC
A commit references this bug:

Author: brueffer
Date: Mon Jul 13 13:02:05 UTC 2015
New revision: 285453
URL: https://svnweb.freebsd.org/changeset/base/285453

Log:
  MFC: r285029

  Fix an obviously wrong boolean operator.

  PR:		200983
  Submitted by:	David Bindeman
  Approved by:	re (gjb)

Changes:
_U  stable/10/
  stable/10/sbin/newfs_nandfs/newfs_nandfs.c
Comment 4 Christian Brueffer freebsd_committer freebsd_triage 2015-07-13 13:03:30 UTC
Merge done.  Thanks again!