summaryrefslogtreecommitdiff
path: root/tools/bpf
diff options
context:
space:
mode:
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>2021-02-08 12:43:36 +0300
committerAndrii Nakryiko <andrii@kernel.org>2021-02-09 04:55:38 +0300
commit0a1b0fd929a8bbdf7c47b418b8d0ee6a8de3a7a3 (patch)
tree6cf66571153b865dfb38cbad2aa32cf24792a6b1 /tools/bpf
parent1589a1fa4e3832bd43742f111e6a883a28fe7ae9 (diff)
downloadlinux-0a1b0fd929a8bbdf7c47b418b8d0ee6a8de3a7a3.tar.xz
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
Diffstat (limited to 'tools/bpf')
-rw-r--r--tools/bpf/bpf_dbg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/bpf/bpf_dbg.c b/tools/bpf/bpf_dbg.c
index a0ebcdf59c31..a07dfc479270 100644
--- a/tools/bpf/bpf_dbg.c
+++ b/tools/bpf/bpf_dbg.c
@@ -890,7 +890,7 @@ static int bpf_run_stepping(struct sock_filter *f, uint16_t bpf_len,
bool stop = false;
int i = 1;
- while (bpf_curr.Rs == false && stop == false) {
+ while (!bpf_curr.Rs && !stop) {
bpf_safe_regs();
if (i++ == next)