Skip to content

Commit

Permalink
selinux: remove unused variabled in the netport, netnode, and netif c…
Browse files Browse the repository at this point in the history
…aches

This patch removes the unused return code variable in the netport,
netnode, and netif initialization functions.

Reported-by: fengguang.wu@intel.com
Signed-off-by: Paul Moore <pmoore@redhat.com>
  • Loading branch information
Paul Moore committed Aug 8, 2014
1 parent bc7e6ed commit 942ba36
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions security/selinux/netif.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ static struct notifier_block sel_netif_netdev_notifier = {

static __init int sel_netif_init(void)
{
int i, err;
int i;

if (!selinux_enabled)
return 0;
Expand All @@ -282,7 +282,7 @@ static __init int sel_netif_init(void)

register_netdevice_notifier(&sel_netif_netdev_notifier);

return err;
return 0;
}

__initcall(sel_netif_init);
Expand Down
3 changes: 1 addition & 2 deletions security/selinux/netnode.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,6 @@ void sel_netnode_flush(void)
static __init int sel_netnode_init(void)
{
int iter;
int ret;

if (!selinux_enabled)
return 0;
Expand All @@ -313,7 +312,7 @@ static __init int sel_netnode_init(void)
sel_netnode_hash[iter].size = 0;
}

return ret;
return 0;
}

__initcall(sel_netnode_init);
3 changes: 1 addition & 2 deletions security/selinux/netport.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ void sel_netport_flush(void)
static __init int sel_netport_init(void)
{
int iter;
int ret;

if (!selinux_enabled)
return 0;
Expand All @@ -247,7 +246,7 @@ static __init int sel_netport_init(void)
sel_netport_hash[iter].size = 0;
}

return ret;
return 0;
}

__initcall(sel_netport_init);

0 comments on commit 942ba36

Please sign in to comment.