[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200708010003.45279.m.kozlowski@tuxland.pl>
Date: Wed, 1 Aug 2007 00:03:44 +0200
From: Mariusz Kozlowski <m.kozlowski@...land.pl>
To: linux-kernel@...r.kernel.org
Cc: kernel-janitors@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>, gregkh@...e.de
Subject: [PATCH 71] kernel/sched.c: kmalloc + memset conversion to kcalloc
Signed-off-by: Mariusz Kozlowski <m.kozlowski@...land.pl>
kernel/sched.c | 166559 -> 166517 (-42 bytes)
kernel/sched.o | 445965 -> 445941 (-24 bytes)
kernel/sched.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- linux-2.6.23-rc1-mm1-a/kernel/sched.c 2007-07-26 13:07:44.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/kernel/sched.c 2007-07-31 15:10:55.000000000 +0200
@@ -5167,10 +5167,10 @@ static struct ctl_table sd_ctl_root[] =
static struct ctl_table *sd_alloc_ctl_entry(int n)
{
- struct ctl_table *entry =
- kmalloc(n * sizeof(struct ctl_table), GFP_KERNEL);
+ struct ctl_table *entry;
+
+ entry = kcalloc(n, sizeof(struct ctl_table), GFP_KERNEL);
BUG_ON(!entry);
- memset(entry, 0, n * sizeof(struct ctl_table));
return entry;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists