bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf] tools/bpftool: fix skeleton codegen
@ 2020-06-12 20:16 Andrii Nakryiko
  2020-06-12 22:05 ` Tobias Klauser
  0 siblings, 1 reply; 3+ messages in thread
From: Andrii Nakryiko @ 2020-06-12 20:16 UTC (permalink / raw)
  To: bpf, netdev, ast, daniel
  Cc: andrii.nakryiko, kernel-team, Andrii Nakryiko, Tobias Klauser

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.

Cc: Tobias Klauser <tklauser@distanz.ch>
Fixes: 2c4779eff837 ("tools, bpftool: Exit on error in function codegen")
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
---
 tools/bpf/bpftool/gen.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/tools/bpf/bpftool/gen.c b/tools/bpf/bpftool/gen.c
index 7443879e87af..10de76b296ba 100644
--- a/tools/bpf/bpftool/gen.c
+++ b/tools/bpf/bpftool/gen.c
@@ -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)
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-06-12 22:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-12 20:16 [PATCH bpf] tools/bpftool: fix skeleton codegen Andrii Nakryiko
2020-06-12 22:05 ` Tobias Klauser
2020-06-12 22:26   ` Alexei Starovoitov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).