mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-16 09:54:35 +00:00
cmd: improve string matching for hex
Match the "=0x" instead of just "=0". Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Heinrich.Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
This commit is contained in:
parent
1678e269c5
commit
0c0d471e2b
1 changed files with 1 additions and 1 deletions
|
@ -262,7 +262,7 @@ static int append_value(char **bufp, size_t *sizep, char *data)
|
|||
char *tmp_buf = NULL, *new_buf = NULL, *value;
|
||||
unsigned long len = 0;
|
||||
|
||||
if (!strncmp(data, "=0x", 2)) { /* hexadecimal number */
|
||||
if (!strncmp(data, "=0x", 3)) { /* hexadecimal number */
|
||||
union {
|
||||
u8 u8;
|
||||
u16 u16;
|
||||
|
|
Loading…
Add table
Reference in a new issue