mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
conf: virDomainNetUpdate() to void
virDomainNetUpdate() return value is invariant, so change it type and remove all dependent checks. Signed-off-by: Artem Chernyshev <artem.chernyshev@red-soft.ru> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
270e363046
commit
88903f9abf
@ -14690,7 +14690,7 @@ virDomainNetRemoveByObj(virDomainDef *def, virDomainNetDef *net)
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
void
|
||||
virDomainNetUpdate(virDomainDef *def,
|
||||
size_t netidx,
|
||||
virDomainNetDef *newnet)
|
||||
@ -14725,7 +14725,6 @@ virDomainNetUpdate(virDomainDef *def,
|
||||
}
|
||||
|
||||
def->nets[netidx] = newnet;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -3891,7 +3891,7 @@ virDomainNetDef *virDomainNetFind(virDomainDef *def, const char *device);
|
||||
virDomainNetDef *virDomainNetFindByName(virDomainDef *def, const char *ifname);
|
||||
bool virDomainHasNet(virDomainDef *def, virDomainNetDef *net);
|
||||
int virDomainNetInsert(virDomainDef *def, virDomainNetDef *net);
|
||||
int virDomainNetUpdate(virDomainDef *def, size_t netidx, virDomainNetDef *newnet);
|
||||
void virDomainNetUpdate(virDomainDef *def, size_t netidx, virDomainNetDef *newnet);
|
||||
bool virDomainNetBackendIsEqual(virDomainNetBackend *src,
|
||||
virDomainNetBackend *dst);
|
||||
int virDomainNetDHCPInterfaces(virDomainDef *def, virDomainInterfacePtr **ifaces);
|
||||
|
@ -3084,8 +3084,7 @@ lxcDomainUpdateDeviceConfig(virDomainDef *vmdef,
|
||||
false) < 0)
|
||||
return -1;
|
||||
|
||||
if (virDomainNetUpdate(vmdef, idx, net) < 0)
|
||||
return -1;
|
||||
virDomainNetUpdate(vmdef, idx, net);
|
||||
|
||||
virDomainNetDefFree(oldDev.data.net);
|
||||
dev->data.net = NULL;
|
||||
|
@ -7145,8 +7145,7 @@ qemuDomainUpdateDeviceConfig(virDomainDef *vmdef,
|
||||
false) < 0)
|
||||
return -1;
|
||||
|
||||
if (virDomainNetUpdate(vmdef, pos, net))
|
||||
return -1;
|
||||
virDomainNetUpdate(vmdef, pos, net);
|
||||
|
||||
virDomainNetDefFree(oldDev.data.net);
|
||||
dev->data.net = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user