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: <200701050910.11828.eike-kernel@sf-tec.de>
Date:	Fri, 5 Jan 2007 09:10:01 +0100
From:	Rolf Eike Beer <eike-kernel@...tec.de>
To:	"Ahmed S. Darwish" <darwish.07@...il.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2.6.20-rc3] TTY_IO: Remove unnecessary kmalloc casts

Ahmed S. Darwish wrote:
> Remove unnecessary kmalloc casts in drivers/char/tty_io.c
>
> Signed-off-by: Ahmed Darwish <darwish.07@...il.com>

>  	if (!*ltp_loc) {
> -		ltp = (struct ktermios *) kmalloc(sizeof(struct ktermios),
> -						 GFP_KERNEL);
> +		ltp = kmalloc(sizeof(struct ktermios), GFP_KERNEL);
                      ^^^^^^^
>  		if (!ltp)
>  			goto free_mem_out;
>  		memset(ltp, 0, sizeof(struct ktermios));
                ^^^^^^

kzalloc

>  		if (!*o_ltp_loc) {
> -			o_ltp = (struct ktermios *)
> -				kmalloc(sizeof(struct ktermios), GFP_KERNEL);
> +			o_ltp = kmalloc(sizeof(struct ktermios), GFP_KERNEL);
                                ^^^^^^^
>  			if (!o_ltp)
>  				goto free_mem_out;
>  			memset(o_ltp, 0, sizeof(struct ktermios));
                        ^^^^^^

kzalloc

HTH

Eike

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ