kernel: Fix left shift into sign bit
The result of left shifting a bit into the sign-bit is undefined behavior. This makes the offending shift operation unsigned. Signed-off-by: Kristian Klomsten Skordal <kristian.skordal@nordicsemi.no>
This commit is contained in:
parent
e1f0a3e1ef
commit
c39e2a2d6c
|
@ -203,7 +203,7 @@ static inline int _get_ready_q_prio_bmap_index(int prio)
|
|||
/* find out the prio bit for a given prio */
|
||||
static inline int _get_ready_q_prio_bit(int prio)
|
||||
{
|
||||
return (1 << ((prio + _NUM_COOP_PRIO) & 0x1f));
|
||||
return (1u << ((prio + _NUM_COOP_PRIO) & 0x1f));
|
||||
}
|
||||
|
||||
/* find out the ready queue array index for a given prio */
|
||||
|
|
Loading…
Reference in a new issue