Skip to content

Commit

Permalink
wlan-ng/prism2mgmt.c: added parantheses to macro
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sebastian Wankerl authored and Greg Kroah-Hartman committed Jan 20, 2013
1 parent 4156a76 commit 52070c7
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions drivers/staging/wlan-ng/prism2mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 52070c7

Please sign in to comment.