Skip to content

Commit

Permalink
bpftool: Simplify format string to not use positional args
Browse files Browse the repository at this point in the history
Change format string referring to just single argument out of two available.
Some versions of libc can reject such format string.

Reported-by: Nikita Shirokov <tehnerd@tehnerd.com>
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20191218214314.2403729-1-andriin@fb.com
  • Loading branch information
Andrii Nakryiko authored and Alexei Starovoitov committed Dec 19, 2019
1 parent 58d8dc2 commit 7c43e0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/bpf/bpftool/gen.c
Original file line number Diff line number Diff line change
Expand Up @@ -567,9 +567,9 @@ static int do_skeleton(int argc, char **argv)
return -1; \n\
} \n\
\n\
#endif /* %2$s */ \n\
#endif /* %s */ \n\
",
obj_name, header_guard);
header_guard);
err = 0;
out:
bpf_object__close(obj);
Expand Down

0 comments on commit 7c43e0d

Please sign in to comment.