projects
/
oweals
/
u-boot_mod.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a8d3343
)
Fix long type support in itest command
author
Piotr Dymacz
<pepe2k@gmail.com>
Mon, 29 Aug 2016 09:02:48 +0000
(11:02 +0200)
committer
Piotr Dymacz
<pepe2k@gmail.com>
Mon, 29 Aug 2016 09:02:48 +0000
(11:02 +0200)
u-boot/common/cmd_itest.c
patch
|
blob
|
history
diff --git
a/u-boot/common/cmd_itest.c
b/u-boot/common/cmd_itest.c
index df3f0516269fbabd28caaa6a7f2eff87a1fb18ea..805cf125ba9eed851d830552a85b942b5da8d624 100644
(file)
--- a/
u-boot/common/cmd_itest.c
+++ b/
u-boot/common/cmd_itest.c
@@
-70,7
+70,8
@@
extern int cmd_get_data_size(char* arg, int default_size);
static long evalexp(char *s, int w)
{
- long l, *p;
+ long *p;
+ long l = 0;
/* if the parameter starts with a * then assume is a pointer to the value we want */
if (s[0] == '*') {
@@
-80,7
+81,10
@@
static long evalexp(char *s, int w)
l = simple_strtoul(s, NULL, 16);
}
- return (l & ((1 << (w * 8)) - 1));
+ if (w < 4)
+ return l & ((1 << (w * 8)) - 1);
+ else
+ return l;
}
static char * evalstr(char *s)