projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
bpftool: Check for NULL ptr of btf in codegen_asserts
[linux-2.6-microblaze.git]
/
tools
/
bpf
/
bpftool
/
gen.c
diff --git
a/tools/bpf/bpftool/gen.c
b/tools/bpf/bpftool/gen.c
index
4c9477f
..
f158dc1
100644
(file)
--- a/
tools/bpf/bpftool/gen.c
+++ b/
tools/bpf/bpftool/gen.c
@@
-474,6
+474,9
@@
static void codegen_asserts(struct bpf_object *obj, const char *obj_name)
const struct btf_type *sec;
char map_ident[256], var_ident[256];
+ if (!btf)
+ return;
+
codegen("\
\n\
__attribute__((unused)) static void \n\