On Sun, 3 Dec 2006, Alan wrote:
> > if (!p) {
> > - p = kmalloc(sizeof(*p), GFP_KERNEL);
> > + p = kzalloc(sizeof(*p), GFP_KERNEL);
> > if (!p)
> > return -ENOMEM;
> > file->private_data = p;
> > }
> > - memset(p, 0, sizeof(
Robert P. J. Day wrote:
> Convert all obvious combinations of kmalloc()+memset() to single
> kzalloc() in the fs/ directory.
[snip]
> diff --git a/fs/seq_file.c b/fs/seq_file.c
> index 555b9ac..f85feba 100644
> --- a/fs/seq_file.c
> +++ b/fs/seq_file.c
> @@ -31,12 +31,11 @@ int seq_open(struct fi
> if (!p) {
> - p = kmalloc(sizeof(*p), GFP_KERNEL);
> + p = kzalloc(sizeof(*p), GFP_KERNEL);
> if (!p)
> return -ENOMEM;
> file->private_data = p;
> }
> - memset(p, 0, sizeof(*p));
> mutex_init(&p->lock
Convert all obvious combinations of kmalloc()+memset() to single
kzalloc() in the fs/ directory.
Signed-off-by: Robert P. J. Day <[EMAIL PROTECTED]>
---
binfmt_elf_fdpic.c |3 +--
seq_file.c |3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/binfmt_elf_
4 matches
Mail list logo