mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
conf: Remove need for a couple of sa_asserts
Remove the need for a couple of sa_asserts.
This commit is contained in:
parent
c78e1cfcb5
commit
62c6778495
@ -24067,10 +24067,11 @@ virDomainObjListCollect(virDomainObjListPtr domlist,
|
|||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
struct virDomainListData data = { NULL, 0 };
|
struct virDomainListData data = { NULL, 0 };
|
||||||
|
ssize_t hash_size;
|
||||||
|
|
||||||
virObjectLock(domlist);
|
virObjectLock(domlist);
|
||||||
sa_assert(domlist->objs);
|
if ((hash_size = virHashSize(domlist->objs)) < 0 ||
|
||||||
if (VIR_ALLOC_N(data.vms, virHashSize(domlist->objs)) < 0) {
|
(VIR_ALLOC_N(data.vms, hash_size) < 0)) {
|
||||||
virObjectUnlock(domlist);
|
virObjectUnlock(domlist);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -24132,8 +24133,8 @@ virDomainObjListConvert(virDomainObjListPtr domlist,
|
|||||||
}
|
}
|
||||||
virObjectUnlock(domlist);
|
virObjectUnlock(domlist);
|
||||||
|
|
||||||
sa_assert(*vms);
|
if (*vms)
|
||||||
virDomainObjListFilter(vms, nvms, conn, filter, flags);
|
virDomainObjListFilter(vms, nvms, conn, filter, flags);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user