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 71] kernel/sched.c: kmalloc + memset conversion to kcalloc
Date
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.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@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-08-01 00:07    [W:0.255 / U:33.496 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site