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] [day] [month] [year] [list]
Message-ID: <486698E4.4030905@keyaccess.nl>
Date:	Sat, 28 Jun 2008 22:02:44 +0200
From:	Rene Herman <rene.herman@...access.nl>
To:	Joe Perches <joe@...ches.com>
CC:	Bjorn Helgaas <bjorn.helgaas@...com>, Len Brown <lenb@...nel.org>,
	Andi Kleen <andi@...stfloor.org>, linux-acpi@...r.kernel.org,
	Rene Herman <rene.herman@...il.com>,
	linux-kernel@...r.kernel.org, Adam Belay <ambx1@....rr.com>,
	Adam M Belay <abelay@....edu>,
	Li Shaohua <shaohua.li@...el.com>,
	Matthieu Castet <castet.matthieu@...e.fr>,
	Thomas Renninger <trenn@...e.de>,
	Jaroslav Kysela <perex@...ex.cz>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Takashi Iwai <tiwai@...e.de>, Jiri Slaby <jirislaby@...il.com>,
	David Howells <dhowells@...hat.com>,
	Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
Subject: Re: [patch 11/28] PNP: whitespace/coding style fixes

On 28-06-08 21:56, Joe Perches wrote:
> On Fri, 2008-06-27 at 16:57 -0600, Bjorn Helgaas wrote:
>> Index: work10/drivers/pnp/interface.c
>> ===================================================================
>> --- work10.orig/drivers/pnp/interface.c	2008-05-09 14:42:25.000000000 -0600
>> +++ work10/drivers/pnp/interface.c	2008-05-09 14:45:57.000000000 -0600
>> @@ -216,12 +216,12 @@ static ssize_t pnp_show_options(struct d
>>  				struct device_attribute *attr, char *buf)
>>  {
>>  	struct pnp_dev *dev = to_pnp_dev(dmdev);
>> +	pnp_info_buffer_t *buffer;
>>  	struct pnp_option *independent = dev->independent;
>>  	struct pnp_option *dependent = dev->dependent;
>>  	int ret, dep = 1;
>>  
>> -	pnp_info_buffer_t *buffer = (pnp_info_buffer_t *)
>> -	    pnp_alloc(sizeof(pnp_info_buffer_t));
>> +	buffer = pnp_alloc(sizeof(pnp_info_buffer_t));
>>  	if (!buffer)
>>  		return -ENOMEM;
> 
> Wouldn't it be nicer without the unnecessary cast?
> 
> 	pnp_info_buffer_t *buffer = pnp_alloc(sizeof(*buffer));

He deleted the cast (the sizeof(type) versus sizeof(var) thing is mostly 
personal preference).

Rene.
--
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