conf: Don't shadow error from virGetDomain()

virGetDomain() does a good job of reporting errors itself. This patch
removes shadowing of that error in virDomainListPopulate().
This commit is contained in:
Peter Krempa 2012-06-28 16:26:07 +02:00
parent 11bdab02c2
commit 6117c35829

View File

@ -117,8 +117,10 @@ virDomainListPopulate(void *payload,
return;
}
if (!(dom = virGetDomain(data->conn, vm->def->name, vm->def->uuid)))
goto no_memory;
if (!(dom = virGetDomain(data->conn, vm->def->name, vm->def->uuid))) {
data->error = true;
goto cleanup;
}
dom->id = vm->def->id;
@ -127,11 +129,6 @@ virDomainListPopulate(void *payload,
cleanup:
virDomainObjUnlock(vm);
return;
no_memory:
virReportOOMError();
data->error = true;
goto cleanup;
}
#undef MATCH