All of lore.kernel.org
 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

* Re: [PATCH bpf] tools/bpftool: fix skeleton codegen
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Tobias Klauser @ 2020-06-12 22:05 UTC (permalink / raw)
  To: Andrii Nakryiko; +Cc: bpf, netdev, ast, daniel, andrii.nakryiko, kernel-team

On 2020-06-12 at 22:16:03 +0200, Andrii Nakryiko <andriin@fb.com> wrote:
> 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>

Reviewed-by: Tobias Klauser <tklauser@distanz.ch>

Sorry about this, thanks for fixing it.

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

* Re: [PATCH bpf] tools/bpftool: fix skeleton codegen
  2020-06-12 22:05 ` Tobias Klauser
@ 2020-06-12 22:26   ` Alexei Starovoitov
  0 siblings, 0 replies; 3+ messages in thread
From: Alexei Starovoitov @ 2020-06-12 22:26 UTC (permalink / raw)
  To: Tobias Klauser
  Cc: Andrii Nakryiko, bpf, Network Development, Alexei Starovoitov,
	Daniel Borkmann, Andrii Nakryiko, Kernel Team

On Fri, Jun 12, 2020 at 3:05 PM Tobias Klauser <tklauser@distanz.ch> wrote:
>
> On 2020-06-12 at 22:16:03 +0200, Andrii Nakryiko <andriin@fb.com> wrote:
> > 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>
>
> Reviewed-by: Tobias Klauser <tklauser@distanz.ch>
>
> Sorry about this, thanks for fixing it.

Applied. Thanks

^ permalink raw reply	[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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.