Skip to content

Commit 0c0d471

Browse files
Dan Carpentertrini
Dan Carpenter
authored andcommitted
cmd: improve string matching for hex
Match the "=0x" instead of just "=0". Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Heinrich.Schuchardt <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>
1 parent 1678e26 commit 0c0d471

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/nvedit_efi.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ static int append_value(char **bufp, size_t *sizep, char *data)
262262
char *tmp_buf = NULL, *new_buf = NULL, *value;
263263
unsigned long len = 0;
264264

265-
if (!strncmp(data, "=0x", 2)) { /* hexadecimal number */
265+
if (!strncmp(data, "=0x", 3)) { /* hexadecimal number */
266266
union {
267267
u8 u8;
268268
u16 u16;

0 commit comments

Comments
 (0)