[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240302005453.305015-2-thorsten.blum@toblux.com>
Date: Sat, 2 Mar 2024 01:54:54 +0100
From: Thorsten Blum <thorsten.blum@...lux.com>
To: Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>
Cc: Martin KaFai Lau <martin.lau@...ux.dev>,
Song Liu <song@...nel.org>,
Yonghong Song <yonghong.song@...ux.dev>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>,
Stanislav Fomichev <sdf@...gle.com>,
Hao Luo <haoluo@...gle.com>,
Jiri Olsa <jolsa@...nel.org>,
bpf@...r.kernel.org,
linux-kernel@...r.kernel.org,
Thorsten Blum <thorsten.blum@...lux.com>
Subject: [PATCH] libbpf: Remove unneeded conversion to bool
Fixes Coccinelle/coccicheck warning reported by boolconv.cocci.
Signed-off-by: Thorsten Blum <thorsten.blum@...lux.com>
---
tools/lib/bpf/libbpf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index afd09571c482..2dda7a6c6f85 100644
--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf/libbpf.c
@@ -1801,7 +1801,7 @@ static int set_kcfg_value_tri(struct extern_desc *ext, void *ext_val,
ext->name, value);
return -EINVAL;
}
- *(bool *)ext_val = value == 'y' ? true : false;
+ *(bool *)ext_val = value == 'y';
break;
case KCFG_TRISTATE:
if (value == 'y')
--
2.44.0
Powered by blists - more mailing lists