Skip to content

Commit

Permalink
tools/bpftool: Fix skeleton codegen
Browse files Browse the repository at this point in the history
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: 2c4779e ("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
  • Loading branch information
Andrii Nakryiko authored and Alexei Starovoitov committed Jun 12, 2020
1 parent 60e5ca8 commit 22eb787
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions tools/bpf/bpftool/gen.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 22eb787

Please sign in to comment.