提交 774bedc4 编写于 作者: J Ján Tomko

vboxDumpNetworks: reduce indentation level

The 'enabled' bool is initialized to false, there is no need to nest the
conditions.
Signed-off-by: NJán Tomko <jtomko@redhat.com>
上级 d8cfda36
......@@ -3822,20 +3822,19 @@ vboxDumpNetworks(virDomainDefPtr def, vboxDriverPtr data, IMachine *machine, PRU
for (i = 0; netAdpIncCnt < def->nnets && i < networkAdapterCount; i++) {
INetworkAdapter *adapter = NULL;
virDomainNetDefPtr net = def->nets[netAdpIncCnt];
PRBool enabled = PR_FALSE;
gVBoxAPI.UIMachine.GetNetworkAdapter(machine, i, &adapter);
if (adapter) {
PRBool enabled = PR_FALSE;
if (adapter)
gVBoxAPI.UINetworkAdapter.GetEnabled(adapter, &enabled);
if (enabled) {
vboxDumpNetwork(net, data, adapter);
netAdpIncCnt++;
}
if (enabled) {
vboxDumpNetwork(net, data, adapter);
VBOX_RELEASE(adapter);
netAdpIncCnt++;
}
VBOX_RELEASE(adapter);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册