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:
Kristian Klomsten Skordal 2018-03-22 13:08:17 +01:00 committed by Anas Nashif
parent e1f0a3e1ef
commit c39e2a2d6c

View file

@ -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 */