Skip to content

Commit

Permalink
tools: bpftool: remove spurious line break from error message
Browse files Browse the repository at this point in the history
The end-of-line character inside the string would break JSON compliance.
Remove it, `p_err()` already adds a '\n' character for plain output
anyway.

Fixes: 9a5ab8b ("tools: bpftool: turn err() and info() macros into functions")
Reported-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com>
Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
  • Loading branch information
Quentin Monnet authored and Daniel Borkmann committed Nov 30, 2017
1 parent 146882a commit 0d954ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/bpf/bpftool/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

#define NEXT_ARG() ({ argc--; argv++; if (argc < 0) usage(); })
#define NEXT_ARGP() ({ (*argc)--; (*argv)++; if (*argc < 0) usage(); })
#define BAD_ARG() ({ p_err("what is '%s'?\n", *argv); -1; })
#define BAD_ARG() ({ p_err("what is '%s'?", *argv); -1; })

#define ERR_MAX_LEN 1024

Expand Down

0 comments on commit 0d954ee

Please sign in to comment.