1
0
Fork 0

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>
utp
Simon Glass 2014-05-30 14:41:49 -06:00 committed by Tom Rini
parent 93ce7561cb
commit c9bcb6f13d
1 changed files with 1 additions and 1 deletions

View File

@ -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)