bpftool: Simplify format string to not use positional args
authorAndrii Nakryiko <andriin@fb.com>
Wed, 18 Dec 2019 21:43:14 +0000 (13:43 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 19 Dec 2019 01:02:16 +0000 (17:02 -0800)
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
tools/bpf/bpftool/gen.c

index 8d93c8f90f8259454831626180e4e2d824748326..851c465f99dcd7d17fc5e20c063ae9a7087f36fb 100644 (file)
@@ -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);