From: Yan Burman <burman.yan@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: trivial@kernel.org, jffs-dev@axis.com
Subject: [PATCH 2.6.19] jffs: replace kmalloc+memset with kzalloc
Date: Sat, 02 Dec 2006 13:31:23 +0200 [thread overview]
Message-ID: <1165059084.4523.33.camel@localhost> (raw)
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;
reply other threads:[~2006-12-02 11:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1165059084.4523.33.camel@localhost \
--to=burman.yan@gmail.com \
--cc=jffs-dev@axis.com \
--cc=linux-kernel@vger.kernel.org \
--cc=trivial@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox