commit | c9bcb6f13d08caa1db13bb8067941340eb3546d8 | [log] [tgz] |
---|---|---|
author | Simon Glass <sjg@chromium.org> | Fri May 30 14:41:49 2014 -0600 |
committer | Tom Rini <trini@ti.com> | Thu Jun 05 14:38:38 2014 -0400 |
tree | 895a63a7bb72bfab0b677463de050615c0c43c20 | |
parent | 93ce7561cb59809c787c3650d791217d2e395f1d [diff] |
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>
diff --git a/common/cmd_itest.c b/common/cmd_itest.c index ae2527b..76af62b 100644 --- a/common/cmd_itest.c +++ b/common/cmd_itest.c
@@ -63,7 +63,7 @@ l = simple_strtoul(s, NULL, 16); } - return (l & ((1 << (w * 8)) - 1)); + return l & ((1UL << (w * 8)) - 1); } static char * evalstr(char *s)