struct device *get_vlan_device_chain(const char *ifname, bool create)
{
- struct device *iface = NULL;
+ struct device *dev = NULL;
char *buf, *s, *next, *err = NULL;
int id;
return NULL;
s = split_vlan(buf);
- iface = device_get(buf, create);
- if (!iface && !create)
+ dev = device_get(buf, create);
+ if (!dev && !create)
goto error;
do {
if (err && *err)
goto error;
- iface = get_vlan_device(iface, id, create);
- if (!iface)
+ dev = get_vlan_device(dev, id, create);
+ if (!dev)
goto error;
s = next;
} while (1);
error:
- iface = NULL;
+ dev = NULL;
out:
free(buf);
- return iface;
+ return dev;
}