libbpf: Remove unneeded conversion to bool
PATCH 1/1 libbpf: Remove unneeded conversion to bool
Fixes Coccinelle/coccicheck warning reported by boolconv.cocci.
Signed-off-by Thorsten Blum <[email protected]>
--- tools/lib/bpf/libbpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/lib/bpf/libbpf.c +1 -1
@@ -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' )
Signature · 1 line
2.44.0
Yonghong Song
reviewerQuoted 3 lines · Thorsten Blum
Fixes Coccinelle/coccicheck warning reported by
boolconv.cocci.Signed-off-by Thorsten Blum <[email protected]>
See
https://lore.kernel.org/bpf/[email protected]/
This has been discussed multiple times and recommendation is to keep it as is.
Quoted 17 lines
--- tools/lib/bpf/libbpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/lib/bpf/libbpf.c +1
-1@@ -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' )