Bug #3075
closedsys/bus/u4b/wlan/if_upgt.c: 3 * pointless tests ?
0%
Description
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.
Updated by swildner about 7 years ago
- 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.