[libvirt PATCH 05/10] virSaveCookieParse: Cleanup

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

 



Remove unnecessary label and goto.

Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx>
---
 src/conf/virsavecookie.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/src/conf/virsavecookie.c b/src/conf/virsavecookie.c
index 6cb7fafb1f..c24a292355 100644
--- a/src/conf/virsavecookie.c
+++ b/src/conf/virsavecookie.c
@@ -58,19 +58,14 @@ virSaveCookieParse(xmlXPathContextPtr ctxt,
                    virSaveCookieCallbacks *saveCookie)
 {
     VIR_XPATH_NODE_AUTORESTORE(ctxt)
-    int ret = -1;
 
     *obj = NULL;
 
     if (!(ctxt->node = virXPathNode("./cookie", ctxt))) {
-        ret = 0;
-        goto cleanup;
+        return 0;
     }
 
-    ret = virSaveCookieParseNode(ctxt, obj, saveCookie);
-
- cleanup:
-    return ret;
+    return virSaveCookieParseNode(ctxt, obj, saveCookie);
 }
 
 
-- 
2.31.1




[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