ubsan: fix undefined shifts
A signed integer cannot be shifted in a way that will flip the sign bit; make such arguments unsigned to be safe Change-Id: Iafc060f98f899ae3ffb876ba22fdd6183fbb6e57
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
#ifndef INCLUDE_BITOPS_FLS_H
|
||||
#define INCLUDE_BITOPS_FLS_H
|
||||
|
||||
static inline int fls(int x)
|
||||
static inline int fls(unsigned int x)
|
||||
{
|
||||
int r = 32;
|
||||
if (!x) {
|
||||
|
||||
Reference in New Issue
Block a user