diff options
author | Panagiotis Issaris <takis@issaris.org> | 2006-07-21 17:51:30 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-07-21 17:51:30 -0400 |
commit | 0da974f4f303a6842516b764507e3c0a03f41e5a (patch) | |
tree | 8872aec792f02040269c6769dd1009b20f71d186 /net/decnet/dn_rules.c | |
parent | a0ee7c70b22f78593957f99faa06acb4747b8bc0 (diff) |
[NET]: Conversions from kmalloc+memset to k(z|c)alloc.
Signed-off-by: Panagiotis Issaris <takis@issaris.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/decnet/dn_rules.c')
-rw-r--r-- | net/decnet/dn_rules.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/decnet/dn_rules.c b/net/decnet/dn_rules.c index 22f321d9bf9d..6986be754ef2 100644 --- a/net/decnet/dn_rules.c +++ b/net/decnet/dn_rules.c | |||
@@ -151,10 +151,9 @@ int dn_fib_rtm_newrule(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) | |||
151 | } | 151 | } |
152 | } | 152 | } |
153 | 153 | ||
154 | new_r = kmalloc(sizeof(*new_r), GFP_KERNEL); | 154 | new_r = kzalloc(sizeof(*new_r), GFP_KERNEL); |
155 | if (!new_r) | 155 | if (!new_r) |
156 | return -ENOMEM; | 156 | return -ENOMEM; |
157 | memset(new_r, 0, sizeof(*new_r)); | ||
158 | 157 | ||
159 | if (rta[RTA_SRC-1]) | 158 | if (rta[RTA_SRC-1]) |
160 | memcpy(&new_r->r_src, RTA_DATA(rta[RTA_SRC-1]), 2); | 159 | memcpy(&new_r->r_src, RTA_DATA(rta[RTA_SRC-1]), 2); |