[PATCH 24/30] util: remove cleanup labels

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

 



From: Barrett Schonefeld <bschoney@xxxxxxxxxx>

- src/util/virstorageencryption.c

Signed-off-by: Barrett Schonefeld <bschoney@xxxxxxxxxx>
---
 src/util/virstorageencryption.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/src/util/virstorageencryption.c b/src/util/virstorageencryption.c
index ed29b4cfa5..a330b79637 100644
--- a/src/util/virstorageencryption.c
+++ b/src/util/virstorageencryption.c
@@ -176,13 +176,12 @@ static int
 virStorageEncryptionInfoParseCipher(xmlNodePtr info_node,
                                     virStorageEncryptionInfoDefPtr info)
 {
-    int ret = -1;
     g_autofree char *size_str = NULL;
 
     if (!(info->cipher_name = virXMLPropString(info_node, "name"))) {
         virReportError(VIR_ERR_XML_ERROR, "%s",
                        _("cipher info missing 'name' attribute"));
-        goto cleanup;
+        return -1;
     }
 
     if ((size_str = virXMLPropString(info_node, "size")) &&
@@ -190,22 +189,19 @@ virStorageEncryptionInfoParseCipher(xmlNodePtr info_node,
         virReportError(VIR_ERR_XML_ERROR,
                        _("cannot parse cipher size: '%s'"),
                        size_str);
-        goto cleanup;
+        return -1;
     }
 
     if (!size_str) {
         virReportError(VIR_ERR_XML_ERROR, "%s",
                        _("cipher info missing 'size' attribute"));
-        goto cleanup;
+        return -1;
     }
 
     info->cipher_mode = virXMLPropString(info_node, "mode");
     info->cipher_hash = virXMLPropString(info_node, "hash");
 
-    ret = 0;
-
- cleanup:
-    return ret;
+    return 0;
 }
 
 
-- 
2.29.0




[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