[PATCH] net/netfilter: remove useless type conversion to bool

Subsystems: netfilter, networking [general], the rest

STALE1713d

2 messages, 2 authors, 2021-11-30 · open the first message on its own page

[PATCH] net/netfilter: remove useless type conversion to bool

From: Bernard Zhao <hidden>
Date: 2021-11-24 02:18:22

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

Signed-off-by: Bernard Zhao <redacted>
---
 net/netfilter/nf_conntrack_netlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
index f1e5443fe7c7..a6503bd188e3 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -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;
-- 
2.33.1

Re: [PATCH] net/netfilter: remove useless type conversion to bool

From: Pablo Neira Ayuso <pablo@netfilter.org>
Date: 2021-11-30 22:13:54

On Tue, Nov 23, 2021 at 06:18:00PM -0800, Bernard Zhao wrote:
dying is bool, the type conversion to true/false value is not
needed.
Applied, thanks
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help