ifconfig: Pacify a sign comparison warning in regdomain_sort.
Both ic_flags values are unsigned (uint32_t), so cast them to a signed int to generate a signed result. Both ic_req values are also unsigned, but since they are uint16_t, they are implicitly promited to int before the subtraction. Reported by: GCC -Wsign-compare Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D40610
This commit is contained in:
parent
a3b1138778
commit
f19ae3633b
@ -2062,7 +2062,7 @@ regdomain_sort(const void *a, const void *b)
|
||||
const struct ieee80211_channel *cb = b;
|
||||
|
||||
return ca->ic_freq == cb->ic_freq ?
|
||||
(ca->ic_flags & CHAN_ALL) - (cb->ic_flags & CHAN_ALL) :
|
||||
(int)(ca->ic_flags & CHAN_ALL) - (int)(cb->ic_flags & CHAN_ALL) :
|
||||
ca->ic_freq - cb->ic_freq;
|
||||
#undef CHAN_ALL
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user