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 39] net/ipv4/ip_options.c: kmalloc + memset conversion to kzalloc
Date
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>

net/ipv4/ip_options.c | 15425 -> 15368 (-57 bytes)
net/ipv4/ip_options.o | 133668 -> 133588 (-80 bytes)

net/ipv4/ip_options.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)

--- linux-2.6.23-rc1-mm1-a/net/ipv4/ip_options.c 2007-07-26 13:07:44.000000000 +0200
+++ linux-2.6.23-rc1-mm1-b/net/ipv4/ip_options.c 2007-07-31 15:17:22.000000000 +0200
@@ -513,11 +513,8 @@ void ip_options_undo(struct ip_options *

static struct ip_options *ip_options_get_alloc(const int optlen)
{
- struct ip_options *opt = kmalloc(sizeof(*opt) + ((optlen + 3) & ~3),
- GFP_KERNEL);
- if (opt)
- memset(opt, 0, sizeof(*opt));
- return opt;
+ return kzalloc(sizeof(struct ip_options) + ((optlen + 3) & ~3),
+ GFP_KERNEL);
}

static int ip_options_get_finish(struct ip_options **optp,
-
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 20:19    [W:0.224 / U:11.076 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site