tools: bpftool: remove spurious line break from error message
authorQuentin Monnet <[email protected]>
Wed, 29 Nov 2017 01:44:31 +0000 (17:44 -0800)
committerDaniel Borkmann <[email protected]>
Thu, 30 Nov 2017 01:09:29 +0000 (02:09 +0100)
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: 9a5ab8bf1d6d ("tools: bpftool: turn err() and info() macros into functions")
Reported-by: Jakub Kicinski <[email protected]>
Signed-off-by: Quentin Monnet <[email protected]>
Acked-by: Jakub Kicinski <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
tools/bpf/bpftool/main.h

index 0b60ddfb2b93aa0d4b85834a6acbb29b483458ed..bff330b49791e5bc6021d8188bd0e637db20ea3b 100644 (file)
@@ -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