* [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
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®