提交 62c67784 编写于 作者: J John Ferlan

conf: Remove need for a couple of sa_asserts

Remove the need for a couple of sa_asserts.
上级 c78e1cfc
......@@ -24067,10 +24067,11 @@ virDomainObjListCollect(virDomainObjListPtr domlist,
unsigned int flags)
{
struct virDomainListData data = { NULL, 0 };
ssize_t hash_size;
virObjectLock(domlist);
sa_assert(domlist->objs);
if (VIR_ALLOC_N(data.vms, virHashSize(domlist->objs)) < 0) {
if ((hash_size = virHashSize(domlist->objs)) < 0 ||
(VIR_ALLOC_N(data.vms, hash_size) < 0)) {
virObjectUnlock(domlist);
return -1;
}
......@@ -24132,8 +24133,8 @@ virDomainObjListConvert(virDomainObjListPtr domlist,
}
virObjectUnlock(domlist);
sa_assert(*vms);
virDomainObjListFilter(vms, nvms, conn, filter, flags);
if (*vms)
virDomainObjListFilter(vms, nvms, conn, filter, flags);
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册