提交 f5bc8b54 编写于 作者: L Laine Stump

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().
上级 83074cc9
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册