[PATCH 20] net/decnet/dn_route.c: kmalloc + memset conversion to kzalloc

From: Mariusz Kozlowski
Date: Tue Jul 31 2007 - 13:33:48 EST


Signed-off-by: Mariusz Kozlowski <m.kozlowski@xxxxxxxxxx>

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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/