* [PATCH] lib: Convert kmalloc()+memset() to kzalloc()
@ 2006-12-03 16:35 Robert P. J. Day
2006-12-03 23:10 ` Alan
0 siblings, 1 reply; 2+ messages in thread
From: Robert P. J. Day @ 2006-12-03 16:35 UTC (permalink / raw)
To: Linux kernel mailing list
Convert the single obvious instance in lib/ of kmalloc() + memset()
to kzalloc().
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
---
diff --git a/lib/kobject.c b/lib/kobject.c
index 744a4b1..7ce6dc1 100644
--- a/lib/kobject.c
+++ b/lib/kobject.c
@@ -111,10 +111,9 @@ char *kobject_get_path(struct kobject *k
len = get_kobj_path_length(kobj);
if (len == 0)
return NULL;
- path = kmalloc(len, gfp_mask);
+ path = kzalloc(len, gfp_mask);
if (!path)
return NULL;
- memset(path, 0x00, len);
fill_kobj_path(kobj, path, len);
return path;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] lib: Convert kmalloc()+memset() to kzalloc()
2006-12-03 16:35 [PATCH] lib: Convert kmalloc()+memset() to kzalloc() Robert P. J. Day
@ 2006-12-03 23:10 ` Alan
0 siblings, 0 replies; 2+ messages in thread
From: Alan @ 2006-12-03 23:10 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: Linux kernel mailing list
On Sun, 3 Dec 2006 11:35:49 -0500 (EST)
"Robert P. J. Day" <rpjday@mindspring.com> wrote:
>
> Convert the single obvious instance in lib/ of kmalloc() + memset()
> to kzalloc().
>
> Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Acked-by: Alan Cox <alan@redhat.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-12-03 23:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-03 16:35 [PATCH] lib: Convert kmalloc()+memset() to kzalloc() Robert P. J. Day
2006-12-03 23:10 ` Alan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®