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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 7 Dec 2006 19:02:34 -0500 (EST)
From:	"Robert P. J. Day" <rpjday@...dspring.com>
To:	Mariusz Kozlowski <m.kozlowski@...land.pl>
cc:	Linux kernel mailing list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] sound : Replace kmalloc()+memset(0) with kzalloc().

On Fri, 8 Dec 2006, Mariusz Kozlowski wrote:

> Hello,
>
>
> >   Replace all appropriate kmalloc() + memset() combinations with
> > kzalloc() throughout the sound/ directory.
>
> [... cut ...]
>
> > diff --git a/sound/oss/i810_audio.c b/sound/oss/i810_audio.c
> > index c3c8a72..f5e31f1 100644
> > --- a/sound/oss/i810_audio.c
> > +++ b/sound/oss/i810_audio.c
> > @@ -2580,10 +2580,9 @@ static int i810_open(struct inode *inode
> >  		for (i = 0; i < NR_HW_CH && card && !card->initializing; i++) {
> >  			if (card->states[i] == NULL) {
> >  				state = card->states[i] = (struct i810_state *)
> > -					kmalloc(sizeof(struct i810_state), GFP_KERNEL);
> > +					kzalloc(sizeof(struct i810_state), GFP_KERNEL);
>
> You can remove those casts while you're at it.

i actually thought about that, but decided to restrict that submission
to just the kmalloc/memset replacement.  a subsequent patch could do a
global change of all k*alloc calls to get rid of superfluous casts.

rday
-
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