]> git.baikalelectronics.ru Git - kernel.git/commitdiff
tools/bpftool: Fix skeleton codegen
authorAndrii Nakryiko <andriin@fb.com>
Fri, 12 Jun 2020 20:16:03 +0000 (13:16 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 12 Jun 2020 22:25:04 +0000 (15:25 -0700)
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: 7a105cad991e ("tools, bpftool: Exit on error in function codegen")
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Reviewed-by: Tobias Klauser <tklauser@distanz.ch>
Link: https://lore.kernel.org/bpf/20200612201603.680852-1-andriin@fb.com
tools/bpf/bpftool/gen.c

index 7443879e87afea37122ff4914f10f982a7f3e7df..10de76b296ba148cd918b64b86dcd97c1e3217f9 100644 (file)
@@ -257,8 +257,6 @@ static void codegen(const char *template, ...)
        va_end(args);
 
        free(s);
-       if (n)
-               exit(-1);
 }
 
 static int do_skeleton(int argc, char **argv)