bpf: Embed kernel CONFIG check into the if statement in bpf_getsockopt
authorMartin KaFai Lau <martin.lau@kernel.org>
Fri, 2 Sep 2022 00:29:06 +0000 (17:29 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 3 Sep 2022 03:34:31 +0000 (20:34 -0700)
commitc2b063ca34586758dcfd76e12696a71a1df849a0
treef5d8b0d4ae8214f00d5d8faaae2197b5401660ec
parent0f95f7d42611882a9a6250923dd493951a94961a
bpf: Embed kernel CONFIG check into the if statement in bpf_getsockopt

This patch moves the "#ifdef CONFIG_XXX" check into the "if/else"
statement itself.  The change is done for the bpf_getsockopt()
function only.  It will make the latter patches easier to follow
without the surrounding ifdef macro.

Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://lore.kernel.org/r/20220902002906.2893572-1-kafai@fb.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
net/core/filter.c