kern/128801: Bug in if_bce.c:bce_get_media()

Adam Morrison adamx at
Tue Nov 11 13:20:02 PST 2008

>Number:         128801
>Category:       kern
>Synopsis:       Bug in if_bce.c:bce_get_media()
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 11 21:20:01 UTC 2008
>Originator:     Adam Morrison
>Release:        HEAD
There is a bug in if_bce.c:bce_get_media() when checking for SerDes:

	if (sc->bce_phy_flags && BCE_PHY_SERDES_FLAG) {

Note "&&" instead of "&".

The way the code is structured everything works out fine because
->bce_phys_flags will be true iff BCE_PHY_SERDES_FLAG is set.
Still, this is confusing and is a potential error waiting to happen.


"&&" -> "&"


More information about the freebsd-bugs mailing list