Skip to contentSkip to conversation

net/netfilter: remove useless type conversion to bool

PATCH Applied Bernard Zhao 2 participants 2 messages Nov 24, 2021 – Nov 30, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/netfilter: remove useless type conversion to bool

dying is bool, the type conversion to true/false value is not needed.

---
 net/netfilter/nf_conntrack_netlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/netfilter/nf_conntrack_netlink.c +1 -1
index f1e5443fe7c7..a6503bd188e3 100644
@@ -1748,7 +1748,7 @@ ctnetlink_dump_list(struct sk_buff *skb, struct netlink_callback *cb, bool dying
 			res = ctnetlink_fill_info(skb, NETLINK_CB(cb->skb).portid,
 						  cb->nlh->nlmsg_seq,
 						  NFNL_MSG_TYPE(cb->nlh->nlmsg_type),
-						  ct, dying ? true : false, 0);
+						  ct, dying, 0);
 			if (res < 0) {
 				if (!atomic_inc_not_zero(&ct->ct_general.use))
 					continue;
Signature · 1 line
2.33.1
maintainer Applied
#1 lore raw
Quoted 2 lines · Bernard Zhao

dying is bool, the type conversion to true/false value is not needed.

Applied, thanks