Skip to contentSkip to conversation

staging: wilc1000: linux_mon.c: Remove unneeded parentheses

PATCH Superseded Janani Ravichandran 2 participants 3 messages Feb 13, 2016 – Feb 14, 2016 Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: wilc1000: linux_mon.c: Remove unneeded parentheses

Remove parentheses around single statement blocks in if conditions as they are not required.

---
 drivers/staging/wilc1000/linux_mon.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/wilc1000/linux_mon.c +1 -2
index e9bb0ec..e5f9ec9 100644
@@ -302,9 +302,8 @@ struct net_device *WILC_WFI_init_mon_interface(const char *name, struct net_devi
 	struct WILC_WFI_mon_priv *priv;
 
 	/*If monitor interface is already initialized, return it*/
-	if (wilc_wfi_mon) {
+	if (wilc_wfi_mon) 
 		return wilc_wfi_mon;
-	}
 
 	wilc_wfi_mon = alloc_etherdev(sizeof(struct WILC_WFI_mon_priv));
 	if (!wilc_wfi_mon) {
Signature · 1 line
2.5.0
#1 lore raw
Quoted 2 lines · Janani Ravichandran

Remove parentheses around single statement blocks in if conditions as they are not required.

I would say that these are braces, not parentheses.

julia

Quoted 31 lines
---
 drivers/staging/wilc1000/linux_mon.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/wilc1000/linux_mon.c +1 -2
index e9bb0ec..e5f9ec9 100644
@@ -302,9 +302,8 @@ struct net_device *WILC_WFI_init_mon_interface(const char *name, struct net_devi
 	struct WILC_WFI_mon_priv *priv;
 
 	/*If monitor interface is already initialized, return it*/
-	if (wilc_wfi_mon) {
+	if (wilc_wfi_mon) 
 		return wilc_wfi_mon;
-	}
 
 	wilc_wfi_mon = alloc_etherdev(sizeof(struct WILC_WFI_mon_priv));
 	if (!wilc_wfi_mon) {
Signature · 8 lines
2.5.0

-- 
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160214044116.GA25811%40janani-Inspiron-3521.
For more options, visit https://groups.google.com/d/optout.
#2 lore raw
Quoted 8 lines · Julia Lawall
Quoted 2 lines · Janani Ravichandran

Remove parentheses around single statement blocks in if conditions as they are not required.

I would say that these are braces, not parentheses.

Oh yes. Sorry. There has been a mistake. WIll send v2.

Janani.

Quoted 4 lines

julia