[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <200707312016.59970.m.kozlowski@tuxland.pl>
Date: Tue, 31 Jul 2007 20:16:59 +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>,
netdev@...r.kernel.org, davem@...emloft.net
Subject: [PATCH 39] net/ipv4/ip_options.c: kmalloc + memset conversion to kzalloc
Signed-off-by: Mariusz Kozlowski <m.kozlowski@...land.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 netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists