Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=376407039c26caacc3e433437d25516ba8f3adc9
Commit:     376407039c26caacc3e433437d25516ba8f3adc9
Parent:     f87966541ef15d28572c8a3caaec359801625228
Author:     Mariusz Kozlowski <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 31 14:06:45 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Tue Jul 31 14:06:45 2007 -0700

    [IPV4] ip_options.c: kmalloc + memset conversion to kzalloc
    
    Signed-off-by: Mariusz Kozlowski <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/ipv4/ip_options.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/net/ipv4/ip_options.c b/net/ipv4/ip_options.c
index 2513468..2f14745 100644
--- a/net/ipv4/ip_options.c
+++ b/net/ipv4/ip_options.c
@@ -513,11 +513,8 @@ void ip_options_undo(struct ip_options * opt)
 
 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 git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to