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]
Date:	Wed, 24 Apr 2013 17:26:15 +0300
From:	Felipe Balbi <balbi@...com>
To:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
CC:	Lee Jones <lee.jones@...aro.org>,
	<linux-arm-kernel@...ts.infradead.org>,
	<linux-kernel@...r.kernel.org>, <arnd@...db.de>,
	<linus.walleij@...ricsson.com>,
	<mian.yousaf.kaukab@...ricsson.com>, Felipe Balbi <balbi@...com>,
	<linux-usb@...r.kernel.org>
Subject: Re: [PATCH 04/10] usb: musb: ux500: harden checks for platform data

On Wed, Apr 24, 2013 at 06:00:28PM +0400, Sergei Shtylyov wrote:
> Hello.
> 
> On 24-04-2013 10:53, Lee Jones wrote:
> 
> >>>  	struct musb_hdrc_platform_data *plat = dev->platform_data;
> >>>-	struct ux500_musb_board_data *data = plat->board_data;
> >>>+	struct ux500_musb_board_data *data;
> 
> >>>-	param_array = data->dma_rx_param_array;
> >>>+	param_array = (data) ? data->dma_rx_param_array : NULL;
> 
> >>    Why enclose a simple variable in parens?
> 
> >Because 'data' is a pointer, so it contains a memory location,

heh, I don't think you fully understood Sergei's comment. He's asking
why you used:

	param_array = (data) ? data->dma_rx_param_array : NULL;

instead of:

	param_array = data ? data->dma_rx_param_array : NULL;

He's saying, correctly so, that the parens around data is unnecessary.

-- 
balbi

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ