Skip to content

Commit

Permalink
libbpf: Remove unnecessary conversion to bool
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
kaixuxiakx authored and kernel-patches-bot committed Nov 6, 2020
1 parent 2f2ff8a commit 376f2d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/lib/bpf/libbpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1475,7 +1475,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')
Expand Down

0 comments on commit 376f2d3

Please sign in to comment.