wlan-ng/prism2mgmt.c: added parantheses to macro
authorSebastian Wankerl <sisewank@cip.cs.fau.de>
Sun, 20 Jan 2013 15:24:45 +0000 (16:24 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 20 Jan 2013 23:56:59 +0000 (15:56 -0800)
Enclose the macro into braces so that it can be closed by a semicolon

Signed-off-by: Sebastian Wankerl <sisewank@cip.cs.fau.de>
Signed-off-by: Sebastian Ehrenfels <qi50dube@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wlan-ng/prism2mgmt.c

index 4efa9bc0fcf0d1750152de5342d565144a2427ce..62b94b017a602533e62d27fb9a7293dde4f94706 100644 (file)
@@ -415,11 +415,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);
@@ -431,11 +434,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);