[DragonFlyBSD - Bug #3011] dragonfly/sys/dev/netif/re/re.c: suspicious code ?

bugtracker-admin at leaf.dragonflybsd.org bugtracker-admin at leaf.dragonflybsd.org
Tue Apr 4 18:44:49 PDT 2017


Issue #3011 has been updated by sepherosa.


Note, this is directly imported vendor code, used by chip
initialization.  Since these chips contains all kinds of weird things,
I'd not change it, if possible.

On Tue, Apr 4, 2017 at 4:19 PM,  <bugtracker-admin at leaf.dragonflybsd.org> wrote:
> Issue #3011 has been reported by dcb.
>
> ----------------------------------------
> Bug #3011: dragonfly/sys/dev/netif/re/re.c: suspicious code ?
> http://bugs.dragonflybsd.org/issues/3011
>
> * Author: dcb
> * Status: New
> * Priority: Normal
> * Assignee:
> * Category:
> * Target version:
> ----------------------------------------
>
>
> dragonfly/sys/dev/netif/re/re.c:6567] -> [dragonfly/sys/dev/netif/re/re.c:6567]: (style) Same expression on both sides of '||'.
> [dragonfly/sys/dev/netif/re/re.c:21948] -> [dragonfly/sys/dev/netif/re/re.c:21948]: (style) Same expression on both sides of '||'.
> [dragonfly/sys/dev/netif/re/re.c:21949] -> [dragonfly/sys/dev/netif/re/re.c:21949]: (style) Same expression on both sides of '||'.
> [dragonfly/sys/dev/netif/re/re.c:22044] -> [dragonfly/sys/dev/netif/re/re.c:22044]: (style) Same expression on both sides of '||'.
> [dragonfly/sys/dev/netif/re/re.c:22104] -> [dragonfly/sys/dev/netif/re/re.c:22104]: (style) Same expression on both sides of '||'.
>
> Taking the first one as an example:
>
>   if ((sc->re_type == MACFG_24) || (sc->re_type == MACFG_24) || (sc->re_type == MACFG_26))
>
> MACFG_25 exists. Possible cut'n'paste error ?
>
>
>
> --
> You have received this notification because you have either subscribed to it, or are involved in it.
> To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account



-- 
Tomorrow Will Never Die

----------------------------------------
Bug #3011: dragonfly/sys/dev/netif/re/re.c: suspicious code ?
http://bugs.dragonflybsd.org/issues/3011#change-13112

* Author: dcb
* Status: New
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
----------------------------------------


dragonfly/sys/dev/netif/re/re.c:6567] -> [dragonfly/sys/dev/netif/re/re.c:6567]: (style) Same expression on both sides of '||'.
[dragonfly/sys/dev/netif/re/re.c:21948] -> [dragonfly/sys/dev/netif/re/re.c:21948]: (style) Same expression on both sides of '||'.
[dragonfly/sys/dev/netif/re/re.c:21949] -> [dragonfly/sys/dev/netif/re/re.c:21949]: (style) Same expression on both sides of '||'.
[dragonfly/sys/dev/netif/re/re.c:22044] -> [dragonfly/sys/dev/netif/re/re.c:22044]: (style) Same expression on both sides of '||'.
[dragonfly/sys/dev/netif/re/re.c:22104] -> [dragonfly/sys/dev/netif/re/re.c:22104]: (style) Same expression on both sides of '||'.

Taking the first one as an example:

  if ((sc->re_type == MACFG_24) || (sc->re_type == MACFG_24) || (sc->re_type == MACFG_26))

MACFG_25 exists. Possible cut'n'paste error ?



-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account


More information about the Bugs mailing list