Skip to content

Commit

Permalink
inet6: functions shadow global variable
Browse files Browse the repository at this point in the history
This renames away a variable clash:
 * ipv6_table[] is declared as a static global table;
 * ipv6_sysctl_net_init() uses ipv6_table to refer/destroy dynamic memory;
 * ipv6_sysctl_net_exit() also uses ipv6_table for the same purpose;
 * both the two last functions call kfree() on ipv6_table.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Gerrit Renker authored and David S. Miller committed Aug 2, 2009
1 parent 8b97c7c commit 81e4321
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/ipv6/sysctl_net_ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ static ctl_table ipv6_table_template[] = {
{ .ctl_name = 0 }
};

static ctl_table ipv6_table[] = {
static ctl_table ipv6_rotable[] = {
{
.ctl_name = NET_IPV6_MLD_MAX_MSF,
.procname = "mld_max_msf",
Expand Down Expand Up @@ -130,7 +130,7 @@ int ipv6_sysctl_register(void)
{
int err = -ENOMEM;

ip6_header = register_net_sysctl_rotable(net_ipv6_ctl_path, ipv6_table);
ip6_header = register_net_sysctl_rotable(net_ipv6_ctl_path, ipv6_rotable);
if (ip6_header == NULL)
goto out;

Expand Down

0 comments on commit 81e4321

Please sign in to comment.