Commit 22eb7879 authored by Andrii Nakryiko's avatar Andrii Nakryiko Committed by Alexei Starovoitov

tools/bpftool: Fix skeleton codegen

Remove unnecessary check at the end of codegen() routine which makes codegen()
to always fail and exit bpftool with error code. Positive value of variable
n is not an indicator of a failure.

Fixes: 2c4779ef ("tools, bpftool: Exit on error in function codegen")
Signed-off-by: default avatarAndrii Nakryiko <andriin@fb.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
Reviewed-by: default avatarTobias Klauser <tklauser@distanz.ch>
Link: https://lore.kernel.org/bpf/20200612201603.680852-1-andriin@fb.com
parent 60e5ca8a
...@@ -257,8 +257,6 @@ static void codegen(const char *template, ...) ...@@ -257,8 +257,6 @@ static void codegen(const char *template, ...)
va_end(args); va_end(args);
free(s); free(s);
if (n)
exit(-1);
} }
static int do_skeleton(int argc, char **argv) static int do_skeleton(int argc, char **argv)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment