提交 4e135e5e 编写于 作者: D Daniel Henrique Barboza 提交者: Erik Skultety

hyperv/hyperv_wmi.c: remove unneeded labels

Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: NErik Skultety <eskultet@redhat.com>
上级 1fa9f75c
......@@ -173,15 +173,15 @@ hypervCreateInvokeParamsList(hypervPrivate *priv, const char *method,
hypervWmiClassInfoPtr info = NULL;
if (hypervGetWmiClassInfo(priv, obj, &info) < 0)
goto cleanup;
return NULL;
if (VIR_ALLOC(params) < 0)
goto cleanup;
return NULL;
if (VIR_ALLOC_N(params->params,
HYPERV_DEFAULT_PARAM_COUNT) < 0) {
VIR_FREE(params);
goto cleanup;
return NULL;
}
params->method = method;
......@@ -191,7 +191,6 @@ hypervCreateInvokeParamsList(hypervPrivate *priv, const char *method,
params->nbParams = 0;
params->nbAvailParams = HYPERV_DEFAULT_PARAM_COUNT;
cleanup:
return params;
}
......@@ -257,11 +256,10 @@ int
hypervAddSimpleParam(hypervInvokeParamsListPtr params, const char *name,
const char *value)
{
int result = -1;
hypervParamPtr p = NULL;
if (hypervCheckParams(params) < 0)
goto cleanup;
return -1;
p = &params->params[params->nbParams];
p->type = HYPERV_SIMPLE_PARAM;
......@@ -271,10 +269,7 @@ hypervAddSimpleParam(hypervInvokeParamsListPtr params, const char *name,
params->nbParams++;
result = 0;
cleanup:
return result;
return 0;
}
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册