mirror of
https://github.com/linux-sunxi/u-boot-sunxi.git
synced 2024-02-12 11:16:03 +08:00
Fix itest mask overflow
The mask value used in itest overflows and therefore it can return an incorrect result for something like 'itest 0 == 1'. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@ -63,7 +63,7 @@ static long evalexp(char *s, int w)
|
||||
l = simple_strtoul(s, NULL, 16);
|
||||
}
|
||||
|
||||
return (l & ((1 << (w * 8)) - 1));
|
||||
return l & ((1UL << (w * 8)) - 1);
|
||||
}
|
||||
|
||||
static char * evalstr(char *s)
|
||||
|
Reference in New Issue
Block a user