]> git.baikalelectronics.ru Git - kernel.git/commit
bpftool: Avoid using "?: " in generated code
authorYucong Sun <fallentree@fb.com>
Tue, 28 Sep 2021 18:42:21 +0000 (11:42 -0700)
committerAndrii Nakryiko <andrii@kernel.org>
Tue, 28 Sep 2021 22:19:22 +0000 (15:19 -0700)
commit4490180fcbe4734a564ded4ee3d428140f6ea20d
treed5bda672678e1b693a87e3b1347b137be4b0613a
parent2f46b7430c4cebae311a503e35694f31197bb466
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: Yucong Sun <fallentree@fb.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210928184221.1545079-1-fallentree@fb.com
tools/bpf/bpftool/gen.c