Skip to contentSkip to conversation

Staging: rtl8723au: core: rtw_ieee80211: Fixed a coding style Warning.

PATCH Superseded Rakhi Sharma 2 participants 2 messages Feb 1, 2016 Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 4/4 Staging: rtl8723au: core: rtw_ieee80211: Fixed a coding style Warning.

Fixed a braces style warning.
Warning: braces {} are not necessary for single statement blocks.

---
 drivers/staging/rtl8723au/core/rtw_ieee80211.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/rtl8723au/core/rtw_ieee80211.c +1 -3
index 0c933e4..365f780 100644
@@ -176,11 +176,9 @@ u8 *rtw_get_ie23a(u8 *pbuf, int index, int *len, int limit)
 	int tmp, i;
 	u8 *p;
 
-	if (limit < 1) {
+	if (limit < 1)
 
 		return NULL;
-	}
-
 	p = pbuf;
 	i = 0;
 	*len = 0;
Signature · 1 line
1.9.1
#1 lore raw
Quoted 2 lines · Rakhi Sharma

Fixed a braces style warning.
Warning: braces {} are not necessary for single statement blocks.

[]

drivers/staging/rtl8723au/core/rtw_ieee80211.c

Quoted 1 line
drivers/staging/rtl8723au/core/rtw_ieee80211.c +0 -0

[]

Quoted 10 lines
drivers/staging/rtl8723au/core/rtw_ieee80211.c +0 -0
@@ -176,11 +176,9 @@ u8 *rtw_get_ie23a(u8 *pbuf, int index, int *len, int limit)
  	int tmp, i;
  	u8 *p;

drivers/staging/rtl8723au/core/rtw_ieee80211.c +1 -1
-	if (limit < 1) {
+	if (limit < 1)


  return NULL;

drivers/staging/rtl8723au/core/rtw_ieee80211.c +0 -2
-	}
-
Quoted 3 lines

  p = pbuf;
  i = 0;
  *len = 0;

This ends up as:

	if (limit < 1)

		return NULL;
	p = pbuf;

And isn't particularly more readable.
It would be better as:

	if (limit < 1)
		return NULL;

	p = pbuf;

etc...