Commit 09710d82 authored by Yucong Sun's avatar Yucong Sun Committed by Andrii Nakryiko

bpftool: Avoid using "?: " in generated code

"?:" is a GNU C extension, some environment has warning flags for its
use, or even prohibit it directly.  This patch avoid triggering these
problems by simply expand it to its full form, no functionality change.
Signed-off-by: default avatarYucong Sun <fallentree@fb.com>
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210928184221.1545079-1-fallentree@fb.com
parent 4e874b11
...@@ -803,7 +803,10 @@ static int do_skeleton(int argc, char **argv) ...@@ -803,7 +803,10 @@ static int do_skeleton(int argc, char **argv)
} \n\ } \n\
\n\ \n\
err = %1$s__create_skeleton(obj); \n\ err = %1$s__create_skeleton(obj); \n\
err = err ?: bpf_object__open_skeleton(obj->skeleton, opts);\n\ if (err) \n\
goto err_out; \n\
\n\
err = bpf_object__open_skeleton(obj->skeleton, opts);\n\
if (err) \n\ if (err) \n\
goto err_out; \n\ goto err_out; \n\
\n\ \n\
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment