Skip to content

Commit 81c8b8e

Browse files
kaixuxiakxkernel-patches-bot
authored andcommitted
libbpf: Remove unnecessary conversion to bool
Fix following warning from coccinelle: ./tools/lib/bpf/libbpf.c:1478:43-48: WARNING: conversion to bool not needed here Signed-off-by: Kaixu Xia <[email protected]>
1 parent d18e2f5 commit 81c8b8e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/lib/bpf/libbpf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1475,7 +1475,7 @@ static int set_kcfg_value_tri(struct extern_desc *ext, void *ext_val,
14751475
ext->name, value);
14761476
return -EINVAL;
14771477
}
1478-
*(bool *)ext_val = value == 'y' ? true : false;
1478+
*(bool *)ext_val = value == 'y';
14791479
break;
14801480
case KCFG_TRISTATE:
14811481
if (value == 'y')

0 commit comments

Comments
 (0)