1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-07 17:28:15 +00:00

vboxDumpNetworks: reduce indentation level

The 'enabled' bool is initialized to false, there is no need to nest the
conditions.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Ján Tomko 2018-02-23 13:19:25 +01:00
parent d8cfda3628
commit 774bedc496

View File

@ -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);
}
}