提交 22eb7879 编写于 作者: A Andrii Nakryiko 提交者: 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: NAndrii Nakryiko <andriin@fb.com>
Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
Reviewed-by: NTobias Klauser <tklauser@distanz.ch>
Link: https://lore.kernel.org/bpf/20200612201603.680852-1-andriin@fb.com
上级 60e5ca8a
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册