aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/addrconf.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@mandriva.com>2006-11-17 09:14:37 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:23:58 -0500
commitaf879cc704372ef762584e916129d19ffb39e844 (patch)
tree09b9cdb70bd6038513792b647b1c93332ce8ee14 /net/ipv6/addrconf.c
parentc67862403e28dd67f38e896736f063d8dd522688 (diff)
[IPV6]: Use kmemdup
Code diff stats: [acme@newtoy net-2.6.20]$ codiff /tmp/ipv6.ko.before /tmp/ipv6.ko.after /pub/scm/linux/kernel/git/acme/net-2.6.20/net/ipv6/ip6_output.c: ip6_output | -52 ip6_append_data | +2 2 functions changed, 2 bytes added, 52 bytes removed /pub/scm/linux/kernel/git/acme/net-2.6.20/net/ipv6/addrconf.c: addrconf_sysctl_register | -27 1 function changed, 27 bytes removed /pub/scm/linux/kernel/git/acme/net-2.6.20/net/ipv6/tcp_ipv6.c: tcp_v6_syn_recv_sock | -32 tcp_v6_parse_md5_keys | -24 2 functions changed, 56 bytes removed /tmp/ipv6.ko.after: 5 functions changed, 2 bytes added, 135 bytes removed [acme@newtoy net-2.6.20]$ Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net/ipv6/addrconf.c')
-rw-r--r--net/ipv6/addrconf.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index b41c5d8b2789..a5e8d207a51b 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -3969,10 +3969,9 @@ static void addrconf_sysctl_register(struct inet6_dev *idev, struct ipv6_devconf
3969 struct addrconf_sysctl_table *t; 3969 struct addrconf_sysctl_table *t;
3970 char *dev_name = NULL; 3970 char *dev_name = NULL;
3971 3971
3972 t = kmalloc(sizeof(*t), GFP_KERNEL); 3972 t = kmemdup(&addrconf_sysctl, sizeof(*t), GFP_KERNEL);
3973 if (t == NULL) 3973 if (t == NULL)
3974 return; 3974 return;
3975 memcpy(t, &addrconf_sysctl, sizeof(*t));
3976 for (i=0; t->addrconf_vars[i].data; i++) { 3975 for (i=0; t->addrconf_vars[i].data; i++) {
3977 t->addrconf_vars[i].data += (char*)p - (char*)&ipv6_devconf; 3976 t->addrconf_vars[i].data += (char*)p - (char*)&ipv6_devconf;
3978 t->addrconf_vars[i].de = NULL; 3977 t->addrconf_vars[i].de = NULL;