lkml.org 
[lkml]   [2007]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 20] net/decnet/dn_route.c: kmalloc + memset conversion to kzalloc
Date
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>

net/decnet/dn_route.c | 45013 -> 44991 (-22 bytes)
net/decnet/dn_route.o | 199388 -> 199580 (+192 bytes)

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

--- linux-2.6.23-rc1-mm1-a/net/decnet/dn_route.c 2007-07-26 13:07:44.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/net/decnet/dn_route.c 2007-07-31 15:15:11.000000000 +0200
@@ -1737,8 +1737,9 @@ static int dn_rt_cache_seq_open(struct i
{
struct seq_file *seq;
int rc = -ENOMEM;
- struct dn_rt_cache_iter_state *s = kmalloc(sizeof(*s), GFP_KERNEL);
-
+ struct dn_rt_cache_iter_state *s;
+
+ s = kzalloc(sizeof(*s), GFP_KERNEL);
if (!s)
goto out;
rc = seq_open(file, &dn_rt_cache_seq_ops);
@@ -1746,7 +1747,6 @@ static int dn_rt_cache_seq_open(struct i
goto out_kfree;
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 linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2007-07-31 19:37    [W:0.276 / U:35.476 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site