lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220425023512.502988-1-ian@linux.cowan.aero>
Date:   Sun, 24 Apr 2022 22:35:12 -0400
From:   Ian Cowan <ian@...ux.cowan.aero>
To:     "David S. Miller" <davem@...emloft.net>
Cc:     Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        Ian Cowan <ian@...ux.cowan.aero>
Subject: [PATCH] net: appletalk: cleanup brace styling

This cleans up some brace styling to meet the style guide. There is one
exception where the compiler wants unnecessary braces to prevent
multiple if/else ambiguity.

Signed-off-by: Ian Cowan <ian@...ux.cowan.aero>
---
 net/appletalk/ddp.c | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c
index bf5736c1d458..2709d9621b25 100644
--- a/net/appletalk/ddp.c
+++ b/net/appletalk/ddp.c
@@ -161,8 +161,9 @@ static void atalk_destroy_timer(struct timer_list *t)
 	if (sk_has_allocations(sk)) {
 		sk->sk_timer.expires = jiffies + SOCK_DESTROY_TIME;
 		add_timer(&sk->sk_timer);
-	} else
+	} else {
 		sock_put(sk);
+	}
 }
 
 static inline void atalk_destroy_socket(struct sock *sk)
@@ -174,8 +175,9 @@ static inline void atalk_destroy_socket(struct sock *sk)
 		timer_setup(&sk->sk_timer, atalk_destroy_timer, 0);
 		sk->sk_timer.expires	= jiffies + SOCK_DESTROY_TIME;
 		add_timer(&sk->sk_timer);
-	} else
+	} else {
 		sock_put(sk);
+	}
 }
 
 /**************************************************************************\
@@ -211,8 +213,9 @@ static void atif_drop_device(struct net_device *dev)
 			dev_put(dev);
 			kfree(tmp);
 			dev->atalk_ptr = NULL;
-		} else
+		} else {
 			iface = &tmp->next;
+		}
 	}
 	write_unlock_bh(&atalk_interfaces_lock);
 }
@@ -444,12 +447,13 @@ static struct atalk_route *atrtr_find(struct atalk_addr *target)
 				 */
 				if (r->target.s_node == target->s_node)
 					goto out;
-			} else
+			} else {
 				/*
 				 * this route will work if there isn't a
 				 * direct host route, so cache it
 				 */
 				net_route = r;
+			}
 		}
 	}
 
@@ -615,8 +619,9 @@ static void atrtr_device_down(struct net_device *dev)
 			*r = tmp->next;
 			dev_put(dev);
 			kfree(tmp);
-		} else
+		} else {
 			r = &tmp->next;
+		}
 	}
 	write_unlock_bh(&atalk_routes_lock);
 
@@ -1386,8 +1391,9 @@ static int atalk_route_packet(struct sk_buff *skb, struct net_device *dev,
 		struct sk_buff *nskb = skb_realloc_headroom(skb, 32);
 		kfree_skb(skb);
 		skb = nskb;
-	} else
+	} else {
 		skb = skb_unshare(skb, GFP_ATOMIC);
+	}
 
 	/*
 	 * If the buffer didn't vanish into the lack of space bitbucket we can
-- 
2.35.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ