lkml.org 
[lkml]   [2006]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] sound : Replace kmalloc()+memset(0) with kzalloc().
Date
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.

--
Regards,

Mariusz Kozlowski
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-12-08 00:57    [W:0.024 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site