ral(4): Use unsigned to avoid undefined behavior.
Found by NetBSD's kUBSan Obtained from: NetBSD (github 5b153f1)
This commit is contained in:
parent
3c40d3fc54
commit
26d9565dfc
@ -2220,7 +2220,7 @@ static void
|
||||
rt2860_enable_mrr(struct rt2860_softc *sc)
|
||||
{
|
||||
#define CCK(mcs) (mcs)
|
||||
#define OFDM(mcs) (1 << 3 | (mcs))
|
||||
#define OFDM(mcs) (1U << 3 | (mcs))
|
||||
RAL_WRITE(sc, RT2860_LG_FBK_CFG0,
|
||||
OFDM(6) << 28 | /* 54->48 */
|
||||
OFDM(5) << 24 | /* 48->36 */
|
||||
@ -3325,7 +3325,7 @@ b4inc(uint32_t b32, int8_t delta)
|
||||
b4 = 0;
|
||||
else if (b4 > 0xf)
|
||||
b4 = 0xf;
|
||||
b32 = b32 >> 4 | b4 << 28;
|
||||
b32 = b32 >> 4 | (uint32_t)b4 << 28;
|
||||
}
|
||||
return b32;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user