[libvirt] [PATCH 1/2] util: properly save/restore original vlan tag for VFs

Eric Blake eblake at redhat.com
Thu Aug 16 14:28:40 UTC 2012


On 08/16/2012 02:34 AM, Osier Yang wrote:

>>
>> -    if (virMacAddrParse(macstr,&oldmac) != 0) {
>> +    if ((vlan = strchr(fileData, '\n'))) {
>> +        char *endptr;
>> +
>> +        *vlan++ = 0; /* NULL terminate the mac address */
> 
> s/terminate/terminates/

Actually, 'terminate' is correct - this is a comment describing what the
assignment is good for (convert arbitrary contents into 0 in order to
NUL-terminate the vlan variable), not the vlan format itself (a valid
vlan exists when NUL terminates the string).

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120816/b0afd64f/attachment-0001.sig>


More information about the libvir-list mailing list