lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121217140004.GQ5083@mwanda>
Date:	Mon, 17 Dec 2012 17:00:04 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Sebastian Wankerl <sisewank@....cs.fau.de>
Cc:	linux-kernel@...informatik.uni-erlangen.de,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
	Sebastian Wankerl 
	<sisewank@...i49man10.informatik.uni-erlangen.de>
Subject: Re: [PATCH 1/3] wlan-ng/prism2mgmt.c: added parenthesis to macro

On Mon, Dec 17, 2012 at 02:38:01PM +0100, Sebastian Wankerl wrote:
> From: Sebastian Wankerl <sisewank@...i49man10.informatik.uni-erlangen.de>
> 
> 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 4efa9bc..62b94b0 100644
> --- a/drivers/staging/wlan-ng/prism2mgmt.c
> +++ b/drivers/staging/wlan-ng/prism2mgmt.c
> @@ -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])) { \

This is a very confusing way to indent.  The proper way is:

	do {                                                                \
		if (count >= N &&                                           \
		    DOT11_RATE5_ISBASIC_GET(item->supprates[(N)-1])) {      \

The "DOT11_RATE5_ISBASIC_GET(item->supprates[(N)-1])" call should be
on one line if possible.

The start 'c' in count and the 'D' in DOT11_ should be in the same
column.  You will need to add some space characters to make this
work.

> +			req->basicrate ## N .data = item->supprates[(N)-1]; \
> +			req->basicrate ## N .status = \
> +				P80211ENUM_msgitem_status_data_ok; \
> +		} \

regards,
dan carpenter
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ