public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2.6.19] jffs: replace kmalloc+memset with kzalloc
@ 2006-12-02 11:31 Yan Burman
  0 siblings, 0 replies; only message in thread
From: Yan Burman @ 2006-12-02 11:31 UTC (permalink / raw)
  To: linux-kernel; +Cc: trivial, jffs-dev

Replace kmalloc+memset with kzalloc

Signed-off-by: Yan Burman <burman.yan@gmail.com>

diff -rubp linux-2.6.19-rc5_orig/fs/jffs/intrep.c linux-2.6.19-rc5_kzalloc/fs/jffs/intrep.c
--- linux-2.6.19-rc5_orig/fs/jffs/intrep.c	2006-11-09 12:16:20.000000000 +0200
+++ linux-2.6.19-rc5_kzalloc/fs/jffs/intrep.c	2006-11-11 22:44:18.000000000 +0200
@@ -591,7 +591,7 @@ jffs_add_virtual_root(struct jffs_contro
 	D2(printk("jffs_add_virtual_root(): "
 		  "Creating a virtual root directory.\n"));
 
-	if (!(root = kmalloc(sizeof(struct jffs_file), GFP_KERNEL))) {
+	if (!(root = kzalloc(sizeof(struct jffs_file), GFP_KERNEL))) {
 		return -ENOMEM;
 	}
 	no_jffs_file++;
@@ -603,7 +603,6 @@ jffs_add_virtual_root(struct jffs_contro
 	DJM(no_jffs_node++);
 	memset(node, 0, sizeof(struct jffs_node));
 	node->ino = JFFS_MIN_INO;
-	memset(root, 0, sizeof(struct jffs_file));
 	root->ino = JFFS_MIN_INO;
 	root->mode = S_IFDIR | S_IRWXU | S_IRGRP
 		     | S_IXGRP | S_IROTH | S_IXOTH;




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-12-02 11:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-02 11:31 [PATCH 2.6.19] jffs: replace kmalloc+memset with kzalloc Yan Burman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox