mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-28 16:56:26 +00:00
bpf: Simplify the calculation of variables
Fix the following coccicheck warnings: ./tools/bpf/bpf_dbg.c:1201:55-57: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Yonghong Song <yhs@fb.com> Link: https://lore.kernel.org/bpf/1614756035-111280-1-git-send-email-jiapeng.chong@linux.alibaba.com
This commit is contained in:
parent
b0d3df486f
commit
46ac034f76
@ -1198,7 +1198,7 @@ static int cmd_run(char *num)
|
||||
else
|
||||
return CMD_OK;
|
||||
bpf_reset();
|
||||
} while (pcap_next_pkt() && (!has_limit || (has_limit && ++i < pkts)));
|
||||
} while (pcap_next_pkt() && (!has_limit || (++i < pkts)));
|
||||
|
||||
rl_printf("bpf passes:%u fails:%u\n", pass, fail);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user