[DragonFlyBSD - Bug #3075] (Closed) sys/bus/u4b/wlan/if_upgt.c: 3 * pointless tests ?

bugtracker-admin at leaf.dragonflybsd.org bugtracker-admin at leaf.dragonflybsd.org
Mon Nov 6 11:16:10 PST 2017


Issue #3075 has been updated by swildner.

Status changed from New to Closed

Closing this one.

Yes, the check is pointless, but upgt(4) isn't built. It was just brought into the src tree at the time we switched to usb4bsd, but has not been ported.

I checked FreeBSD's current version and that does not have this issue. Whenever someone decides to port this driver, if ever, they will very likely bring in FreeBSD's current code over our old version.


----------------------------------------
Bug #3075: sys/bus/u4b/wlan/if_upgt.c: 3 * pointless tests ?
http://bugs.dragonflybsd.org/issues/3075#change-13308

* Author: dcb
* Status: Closed
* Priority: Low
* Assignee: 
* Category: 
* Target version: 
----------------------------------------
dragonfly/sys/bus/u4b/wlan/if_upgt.c:1225]: (style) Unsigned variable 'channel' can't be negative so it is unnecessary to test it.

Source code is

       if (!(channel >= 0 && channel < IEEE80211_CHAN_MAX))

but

    unsigned channel;


Some duplicates:

dragonfly/sys/bus/u4b/wlan/if_upgt.c:1258]: (style) Unsigned variable 'channel' can't be negative so it is unnecessary to test it.
dragonfly/sys/bus/u4b/wlan/if_upgt.c:1286]: (style) Unsigned variable 'channel' can't be negative so it is unnecessary to test it.




-- 
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