[libvirt] [PATCH 1/3] add functions: load 8021q module, create/destroy vlan-dev
John Ferlan
jferlan at redhat.com
Wed Jul 18 11:44:42 UTC 2018
[...]
>>> +
>>> +static int
>>> +controlVlanDev(unsigned int cmd,
>>> + const char *ifname, unsigned int vlanid)
>>
>> One line per argument.
>
> OK
>
>>
>>> +{
>>
>> int ret = -1;
>>
>
> Why need ret?
>
I was going to suggest changing the code to use a cleanup: label like
many other functions, but then figured it wasn't necessary, but forgot
to go back and remove this line.
John
>>> + int fd;
>>> + struct vlan_ioctl_args if_request;
>>> + memset(&if_request, 0, sizeof(struct vlan_ioctl_args));
>>> + if_request.cmd = cmd;
>>> +
[...]
More information about the libvir-list
mailing list