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]
Date:	Wed, 20 May 2009 20:16:51 +0900
From:	Paul Mundt <lethal@...ux-sh.org>
To:	Andr? Lopes <andre.neo.net@...il.com>
Cc:	kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: Are the cast necessary in function "kfree"?

On Wed, May 20, 2009 at 11:30:21AM +0100, Andr? Lopes wrote:
> Hi. This is my first post :-)
> 
> I was reading this doc (/linux-2.6/Documentation/scsi/ChangeLog.lpfc),
> when I found this phrase: "Replace some kfree((void*)ptr) with
> kfree(ptr)."
> 
[snip]

> These casts are not necessary...I think so. If it's yes, can we apply
> patch's to clean-up this?
> 
The key thing here is "ptr", as long as these are pointers, then the cast
is superfluous. In the case of casting from a non-pointer type, the cast
is necessary, particularly if the data type and pointer size vary.
--
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