[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1358695485-1793-1-git-send-email-sisewank@cip.cs.fau.de>
Date: Sun, 20 Jan 2013 16:24:45 +0100
From: Sebastian Wankerl <sisewank@....cs.fau.de>
To: linux-kernel@...informatik.uni-erlangen.de,
devel@...verdev.osuosl.org, gregkh@...uxfoundation.org,
dan.carpenter@...cle.com, linux-kernel@...r.kernel.org
Cc: Sebastian Wankerl <sisewank@....cs.fau.de>,
Sebastian Ehrenfels <qi50dube@....cs.fau.de>
Subject: [PATCH 1/2] wlan-ng/prism2mgmt.c: added parantheses to macro
From: Sebastian Wankerl <sisewank@....cs.fau.de>
Enclose the macro into braces so that it can be closed by a semicolon
Signed-off-by: Sebastian Wankerl <sisewank@....cs.fau.de>
Signed-off-by: Sebastian Ehrenfels <qi50dube@....cs.fau.de>
---
drivers/staging/wlan-ng/prism2mgmt.c | 25 +++++++++++++++----------
1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/wlan-ng/prism2mgmt.c b/drivers/staging/wlan-ng/prism2mgmt.c
index 02a4bf7..6021f89 100644
--- a/drivers/staging/wlan-ng/prism2mgmt.c
+++ b/drivers/staging/wlan-ng/prism2mgmt.c
@@ -421,11 +421,14 @@ int prism2mgmt_scan_results(wlandevice_t *wlandev, void *msgp)
break;
#define REQBASICRATE(N) \
- if ((count >= N) && DOT11_RATE5_ISBASIC_GET(item->supprates[(N)-1])) { \
- req->basicrate ## N .data = item->supprates[(N)-1]; \
- req->basicrate ## N .status = \
- P80211ENUM_msgitem_status_data_ok; \
- }
+ do { \
+ if ((count >= N) && DOT11_RATE5_ISBASIC_GET( \
+ item->supprates[(N)-1])) { \
+ req->basicrate ## N .data = item->supprates[(N)-1]; \
+ req->basicrate ## N .status = \
+ P80211ENUM_msgitem_status_data_ok; \
+ } \
+ } while (0)
REQBASICRATE(1);
REQBASICRATE(2);
@@ -437,11 +440,13 @@ int prism2mgmt_scan_results(wlandevice_t *wlandev, void *msgp)
REQBASICRATE(8);
#define REQSUPPRATE(N) \
- if (count >= N) { \
- req->supprate ## N .data = item->supprates[(N)-1]; \
- req->supprate ## N .status = \
- P80211ENUM_msgitem_status_data_ok; \
- }
+ do { \
+ if (count >= N) { \
+ req->supprate ## N .data = item->supprates[(N)-1]; \
+ req->supprate ## N .status = \
+ P80211ENUM_msgitem_status_data_ok; \
+ } \
+ } while (0)
REQSUPPRATE(1);
REQSUPPRATE(2);
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists