From: Sokolov Evgeny <[email protected]>

Remove the redundant self-assignment of rd->u.max in eval_divmod().

The assignment has no effect and can be safely removed.

Found by InfoTeCS on behalf of Linux Verification Center (linuxtesting.org) 
with SVACE.

Signed-off-by: Sokolov Evgeny <[email protected]>
---
 lib/bpf/bpf_validate.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/bpf/bpf_validate.c b/lib/bpf/bpf_validate.c
index 8bd8c10177..000d218cb4 100644
--- a/lib/bpf/bpf_validate.c
+++ b/lib/bpf/bpf_validate.c
@@ -958,8 +958,6 @@ eval_divmod(uint32_t op, struct bpf_reg_val *rd, struct 
bpf_reg_val *rs, uint64_
        } else {
                if (op == BPF_MOD)
                        rd->u.max = RTE_MIN(rd->u.max, rs->u.max - 1);
-               else
-                       rd->u.max = rd->u.max;
                rd->u.min = 0;
        }
 
-- 
2.30.2

Reply via email to