]> Git Repo - J-linux.git/commitdiff
bpf: Avoid unnecessary use of comma operator in verifier
authorSimon Horman <[email protected]>
Thu, 21 Dec 2023 17:03:52 +0000 (18:03 +0100)
committerDaniel Borkmann <[email protected]>
Thu, 21 Dec 2023 21:40:25 +0000 (22:40 +0100)
Although it does not seem to have any untoward side-effects, the use
of ';' to separate to assignments seems more appropriate than ','.

Flagged by clang-17 -Wcomma

No functional change intended. Compile tested only.

Signed-off-by: Simon Horman <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Reviewed-by: Dave Marchevsky <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
kernel/bpf/verifier.c

index f13008d27f3578e64d414f23dcabb3a024ade4ae..a376eb609c414216eaf8b838c88ea12a27cd5b03 100644 (file)
@@ -9616,7 +9616,7 @@ static int set_find_vma_callback_state(struct bpf_verifier_env *env,
        callee->regs[BPF_REG_2].type = PTR_TO_BTF_ID;
        __mark_reg_known_zero(&callee->regs[BPF_REG_2]);
        callee->regs[BPF_REG_2].btf =  btf_vmlinux;
-       callee->regs[BPF_REG_2].btf_id = btf_tracing_ids[BTF_TRACING_TYPE_VMA],
+       callee->regs[BPF_REG_2].btf_id = btf_tracing_ids[BTF_TRACING_TYPE_VMA];
 
        /* pointer to stack or null */
        callee->regs[BPF_REG_3] = caller->regs[BPF_REG_4];
This page took 0.078181 seconds and 4 git commands to generate.