Skip to content
Snippets Groups Projects
Commit c9bcb6f1 authored by Simon Glass's avatar Simon Glass Committed by Tom Rini
Browse files

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: default avatarSimon Glass <sjg@chromium.org>
parent 93ce7561
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment