Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@xxxxxxxxxxxxx> --- src/vz/vz_sdk.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index 612a059..12691ba 100644 --- a/src/vz/vz_sdk.c +++ b/src/vz/vz_sdk.c @@ -1669,21 +1669,19 @@ prlsdkUpdateDomain(vzDriverPtr driver, virDomainObjPtr dom) return prlsdkLoadDomain(driver, pdom->sdkdom, dom) ? 0 : -1; } -static int prlsdkSendEvent(vzDriverPtr driver, - virDomainObjPtr dom, - virDomainEventType lvEventType, - int lvEventTypeDetails) +static void +prlsdkSendEvent(vzDriverPtr driver, + virDomainObjPtr dom, + virDomainEventType lvEventType, + int lvEventTypeDetails) { - virObjectEventPtr event = NULL; + virObjectEventPtr event; event = virDomainEventLifecycleNewFromObj(dom, lvEventType, lvEventTypeDetails); if (!event) - return -1; - - virObjectEventStateQueue(driver->domainEventState, event); - return 0; + virObjectEventStateQueue(driver->domainEventState, event); } static void @@ -3887,9 +3885,8 @@ prlsdkUnregisterDomain(vzDriverPtr driver, virDomainObjPtr dom, unsigned int fla for (i = 0; i < dom->def->nnets; i++) prlsdkCleanupBridgedNet(driver, dom->def->nets[i]); - if (prlsdkSendEvent(driver, dom, VIR_DOMAIN_EVENT_UNDEFINED, - VIR_DOMAIN_EVENT_UNDEFINED_REMOVED) < 0) - goto cleanup; + prlsdkSendEvent(driver, dom, VIR_DOMAIN_EVENT_UNDEFINED, + VIR_DOMAIN_EVENT_UNDEFINED_REMOVED); virDomainObjListRemove(driver->domains, dom); -- 1.8.3.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list