* [PATCH] add braces to rt_type == RTN_BROADCAST case
@ 2023-05-09 1:36 Taichi Nishimura
2023-05-09 1:52 ` Jakub Kicinski
0 siblings, 1 reply; 2+ messages in thread
From: Taichi Nishimura @ 2023-05-09 1:36 UTC (permalink / raw)
To: davem, dsahern, edumazet, kuba, pabeni
Cc: netdev, linux-kernel, bpf, Taichi Nishimura
Add braces to rt->rt_type == RTN_BROADCAST to make it easier
to grasp the if-else-if statement.
I think that it is ok to remove braces of rt_type == RTN_MULTICAST
because IP_UPD_PO_STATS is oneliner.
Signed-off-by: Taichi Nishimura <awkrail01@gmail.com>
---
net/ipv4/ip_output.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 61892268e8a6..8b761e1a9e24 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -203,8 +203,9 @@ static int ip_finish_output2(struct net *net, struct sock *sk, struct sk_buff *s
if (rt->rt_type == RTN_MULTICAST) {
IP_UPD_PO_STATS(net, IPSTATS_MIB_OUTMCAST, skb->len);
- } else if (rt->rt_type == RTN_BROADCAST)
+ } else if (rt->rt_type == RTN_BROADCAST) {
IP_UPD_PO_STATS(net, IPSTATS_MIB_OUTBCAST, skb->len);
+ }
if (unlikely(skb_headroom(skb) < hh_len && dev->header_ops)) {
skb = skb_expand_head(skb, hh_len);
--
2.39.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-05-09 1:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-09 1:36 [PATCH] add braces to rt_type == RTN_BROADCAST case Taichi Nishimura
2023-05-09 1:52 ` Jakub Kicinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).