mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 22:55:23 +00:00
vz: make error path code idiomatic
Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com> Signed-off-by: Maxim Nestratov <mnestratov@virtuozzo.com>
This commit is contained in:
parent
4aef1a5e3e
commit
e10a4c67c3
@ -3777,8 +3777,7 @@ prlsdkCreateCt(vzDriverPtr driver, virDomainDefPtr def)
|
||||
|
||||
}
|
||||
|
||||
ret = prlsdkDoApplyConfig(driver, sdkdom, def, NULL);
|
||||
if (ret)
|
||||
if (prlsdkDoApplyConfig(driver, sdkdom, def, NULL) < 0)
|
||||
goto cleanup;
|
||||
|
||||
flags = PACF_NON_INTERACTIVE_MODE;
|
||||
@ -3786,7 +3785,9 @@ prlsdkCreateCt(vzDriverPtr driver, virDomainDefPtr def)
|
||||
flags |= PRNVM_PRESERVE_DISK;
|
||||
job = PrlVm_RegEx(sdkdom, "", flags);
|
||||
if (PRL_FAILED(waitJob(job)))
|
||||
ret = -1;
|
||||
goto cleanup;
|
||||
|
||||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
PrlHandle_Free(sdkdom);
|
||||
|
Loading…
Reference in New Issue
Block a user