Without this fix, the following statement erroneously echoed "true" (at least on the microblaze architecture): if itest.l 0 == 1; then echo "true"; else echo "false"; fi
(using itest.w or itest.b worked as expected even without this change) Signed-off-by: Josh Radel <josh.radel_at_intusurg.com> --- common/cmd_itest.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) mode change 100644 => 100755 common/cmd_itest.c diff --git a/common/cmd_itest.c b/common/cmd_itest.c old mode 100644 new mode 100755 index 2a238a4..5f5ac4e --- a/common/cmd_itest.c +++ b/common/cmd_itest.c @@ -79,7 +79,11 @@ static long evalexp(char *s, int w) l = simple_strtoul(s, NULL, 16); } - return (l & ((1 << (w * 8)) - 1)); + if (w < sizeof(long)) { + return (l & ((1 << (w * 8)) - 1)); + } else { + return (l); + } } static char * evalstr(char *s) -- 1.6.0.4 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot