bpf: Simplify bool comparison

Fix the following coccicheck warning:

./tools/bpf/bpf_dbg.c:893:32-36: WARNING: Comparison to bool.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/1612777416-34339-1-git-send-email-jiapeng.chong@linux.alibaba.com
This commit is contained in:
Jiapeng Chong 2021-02-08 17:43:36 +08:00 committed by Andrii Nakryiko
parent 1589a1fa4e
commit 0a1b0fd929
1 changed files with 1 additions and 1 deletions

View File

@ -890,7 +890,7 @@ static int bpf_run_stepping(struct sock_filter *f, uint16_t bpf_len,
bool stop = false; bool stop = false;
int i = 1; int i = 1;
while (bpf_curr.Rs == false && stop == false) { while (!bpf_curr.Rs && !stop) {
bpf_safe_regs(); bpf_safe_regs();
if (i++ == next) if (i++ == next)