mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-27 20:07:09 +00:00
tools: bpftool: print only one error message on byte parsing failure
Make error messages more consistent. Specifically, when bpftool fails at parsing map key bytes, make it print a single error message to stderr and return from the function, instead of (always) printing a second error message afterwards. Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
9f606179c8
commit
d9c0b48db9
@ -252,7 +252,7 @@ static char **parse_bytes(char **argv, const char *name, unsigned char *val,
|
||||
val[i] = strtoul(argv[i], &endptr, 0);
|
||||
if (*endptr) {
|
||||
err("error parsing byte: %s\n", argv[i]);
|
||||
break;
|
||||
return NULL;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user