lkml.org 
[lkml]   [2017]   [Dec]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/4] libbpf: break loop earlier
Date
Get out of the loop when we have a match.

Signed-off-by: Eric Leblond <eric@regit.org>
---
tools/lib/bpf/libbpf.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index 5fe8aaa2123e..d263748aa341 100644
--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf/libbpf.c
@@ -412,6 +412,7 @@ bpf_object__init_prog_names(struct bpf_object *obj)
prog->section_name);
return -LIBBPF_ERRNO__LIBELF;
}
+ break;
}

if (!name) {
--
2.15.1
\
 
 \ /
  Last update: 2017-12-27 19:04    [W:0.050 / U:5.688 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site