提交 e10a4c67 编写于 作者: N Nikolay Shirokovskiy 提交者: Maxim Nestratov

vz: make error path code idiomatic

Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Signed-off-by: NMaxim Nestratov <mnestratov@virtuozzo.com>
上级 4aef1a5e
...@@ -3777,8 +3777,7 @@ prlsdkCreateCt(vzDriverPtr driver, virDomainDefPtr def) ...@@ -3777,8 +3777,7 @@ prlsdkCreateCt(vzDriverPtr driver, virDomainDefPtr def)
} }
ret = prlsdkDoApplyConfig(driver, sdkdom, def, NULL); if (prlsdkDoApplyConfig(driver, sdkdom, def, NULL) < 0)
if (ret)
goto cleanup; goto cleanup;
flags = PACF_NON_INTERACTIVE_MODE; flags = PACF_NON_INTERACTIVE_MODE;
...@@ -3786,7 +3785,9 @@ prlsdkCreateCt(vzDriverPtr driver, virDomainDefPtr def) ...@@ -3786,7 +3785,9 @@ prlsdkCreateCt(vzDriverPtr driver, virDomainDefPtr def)
flags |= PRNVM_PRESERVE_DISK; flags |= PRNVM_PRESERVE_DISK;
job = PrlVm_RegEx(sdkdom, "", flags); job = PrlVm_RegEx(sdkdom, "", flags);
if (PRL_FAILED(waitJob(job))) if (PRL_FAILED(waitJob(job)))
ret = -1; goto cleanup;
ret = 0;
cleanup: cleanup:
PrlHandle_Free(sdkdom); PrlHandle_Free(sdkdom);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册