Skip to content

Commit baf4bca

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 <kaixuxia@tencent.com>
1 parent 7ed8d57 commit baf4bca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/lib/bpf/libbpf.c

+1-1
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)