mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
util: eliminate superfluous saveVlan check in virNetDevSetNetConfig()
Commit 81fb440b further qualified an if statement by adding the boolean saveVlan to the condition. Coverity pointed out that this change in the logic eliminated the need to check saveVlan in an argument to virAsprintf().
This commit is contained in:
parent
83074cc917
commit
f5bc8b5436
@ -1936,10 +1936,8 @@ virNetDevSaveNetConfig(const char *linkdev, int vf,
|
||||
goto cleanup;
|
||||
|
||||
/* get admin MAC and vlan tag */
|
||||
if (virNetDevGetVfConfig(pfDevName, vf, &oldMAC,
|
||||
saveVlan ? &oldVlanTag : NULL) < 0) {
|
||||
if (virNetDevGetVfConfig(pfDevName, vf, &oldMAC, &oldVlanTag) < 0)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (virJSONValueObjectAppendString(configJSON,
|
||||
VIR_NETDEV_KEYNAME_ADMIN_MAC,
|
||||
|
Loading…
Reference in New Issue
Block a user