diff options
| author | Dan Carpenter <[email protected]> | 2023-07-31 17:03:59 +0300 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2023-08-08 17:41:52 -0400 |
| commit | 0c0d471e2be018342fd191892e1cccc2231db90b (patch) | |
| tree | a6ea6f99a902709a6730019307110c122197a291 /cmd | |
| parent | 1678e269c565fc47daf09e79e5a4fdfe59e20870 (diff) | |
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]>
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/nvedit_efi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/nvedit_efi.c b/cmd/nvedit_efi.c index 24944ab81e2..7a30b5cc8f8 100644 --- a/cmd/nvedit_efi.c +++ b/cmd/nvedit_efi.c @@ -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; |
