2
0
mirror of git://github.com/lxc/lxc synced 2025-08-31 15:19:26 +00:00

coverity: fix use before null check

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
Serge Hallyn
2013-12-12 12:51:35 -06:00
parent ce42ba2c79
commit 32571606a1

View File

@@ -140,10 +140,11 @@ int lxc_netdev_move_by_name(char *ifname, pid_t pid)
{
int index;
index = if_nametoindex(ifname);
if (!ifname)
return -EINVAL;
index = if_nametoindex(ifname);
return lxc_netdev_move_by_index(index, pid);
}