Bug 200985 - sys/dev/hwpmc/hwpmc_piv.c:812: bad assert ?
Summary: sys/dev/hwpmc/hwpmc_piv.c:812: bad assert ?
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 10.1-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: hwpmc
Depends on:
Blocks:
 
Reported: 2015-06-20 08:31 UTC by David Binderman
Modified: 2018-07-16 01:36 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:31:29 UTC
sys/dev/hwpmc/hwpmc_piv.c:812]: (warning) Logical disjunction always evaluates to true: cfgflags >= 0 || cfgflags <= 3

   KASSERT(cfgflags >= 0 || cfgflags <= 3,

Maybe

   KASSERT(cfgflags >= 0 && cfgflags <= 3,
Comment 1 David Binderman 2015-06-20 08:34:00 UTC
Same thing at line 838

   KASSERT(cfgflags >= 0 || cfgflags <= 3,
Comment 2 Hiren Panchasara freebsd_committer freebsd_triage 2015-06-20 17:04:54 UTC
David,

Your analysis looks correct to me.
Comment 3 Oleksandr Tymoshenko freebsd_committer freebsd_triage 2018-07-16 01:36:53 UTC
File was removed in base r334456