Re: [PATCH 66] net/ipv4/raw.c: kmalloc + memset conversion to kzalloc

2007-08-01 Thread David Miller
From: Mariusz Kozlowski <[EMAIL PROTECTED]>
Date: Tue, 31 Jul 2007 23:54:00 +0200

> Signed-off-by: Mariusz Kozlowski <[EMAIL PROTECTED]>

Applied.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 66] net/ipv4/raw.c: kmalloc + memset conversion to kzalloc

2007-07-31 Thread Mariusz Kozlowski
Signed-off-by: Mariusz Kozlowski <[EMAIL PROTECTED]>

 net/ipv4/raw.c | 21650 -> 21628 (-22 bytes)
 net/ipv4/raw.o | 179112 -> 179272 (+160 bytes)

 net/ipv4/raw.c |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- linux-2.6.23-rc1-mm1-a/net/ipv4/raw.c   2007-07-26 13:07:44.0 
+0200
+++ linux-2.6.23-rc1-mm1-b/net/ipv4/raw.c   2007-07-31 15:20:27.0 
+0200
@@ -900,8 +900,9 @@ static int raw_seq_open(struct inode *in
 {
struct seq_file *seq;
int rc = -ENOMEM;
-   struct raw_iter_state *s = kmalloc(sizeof(*s), GFP_KERNEL);
-
+   struct raw_iter_state *s;
+
+   s = kzalloc(sizeof(*s), GFP_KERNEL);
if (!s)
goto out;
rc = seq_open(file, &raw_seq_ops);
@@ -910,7 +911,6 @@ static int raw_seq_open(struct inode *in

seq = file->private_data;
seq->private = s;
-   memset(s, 0, sizeof(*s));
 out:
return rc;
 out_kfree:
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html