add braces to rt_type == RTN_BROADCAST case
Subsystems (4)
PATCH 1/1 add braces to rt_type == RTN_BROADCAST case
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 <[email protected]>
--- net/ipv4/ip_output.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/ipv4/ip_output.c +2 -1
@@ -203,8 +203,9 @@ static int ip_finish_output2(struct net *net, struct sock *sk, struct sk_buff *sif (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);
Signature · 1 line
2.39.2
Jakub Kicinski
maintainerQuoted 4 lines · On Tue, 9 May 2023 10:36:01 +0900 Taichi Nishimura wrote:
Add braces to
rt->rt_type==RTN_BROADCASTto make it easier to grasp the if-else-if statement.
I think that it is ok to remove braces ofrt_type==RTN_MULTICASTbecauseIP_UPD_PO_STATSis oneliner.
I'm sorry but unfortunately we don't take pure coding style changes (AKA checkpatch changes) in networking because they make backports harder for little gain.
Signature · 1 line
pw-bot: reject