[PATCH v1 09/26] hyperv/hyperv_wmi.c: remove unneeded labels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Daniel Henrique Barboza <danielhb413@xxxxxxxxx>
---
 src/hyperv/hyperv_wmi.c | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/src/hyperv/hyperv_wmi.c b/src/hyperv/hyperv_wmi.c
index 7d56677588..ca2d29733e 100644
--- a/src/hyperv/hyperv_wmi.c
+++ b/src/hyperv/hyperv_wmi.c
@@ -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;
 }
 
 /*
-- 
2.24.1


--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux