[PATCH 06/12] libxl: remove 'ret' from xenParseSxprVifRate

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

 



Now that the cleanup section is empty, the ret variable is no longer
necessary.

Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
---
 src/libxl/xen_common.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/src/libxl/xen_common.c b/src/libxl/xen_common.c
index 15a2db8add..0cb7f0f331 100644
--- a/src/libxl/xen_common.c
+++ b/src/libxl/xen_common.c
@@ -1064,7 +1064,6 @@ xenParseSxprVifRate(const char *rate, unsigned long long *kbytes_per_sec)
     char *p;
     char *suffix;
     unsigned long long tmp;
-    int ret = -1;
 
     trate = g_strdup(rate);
 
@@ -1082,13 +1081,13 @@ xenParseSxprVifRate(const char *rate, unsigned long long *kbytes_per_sec)
     if (!g_regex_match(regex, trate, 0, NULL)) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
                        _("Invalid rate '%s' specified"), rate);
-        goto cleanup;
+        return -1;
     }
 
     if (virStrToLong_ull(rate, &suffix, 10, &tmp)) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
                        _("Failed to parse rate '%s'"), rate);
-        goto cleanup;
+        return -1;
     }
 
     if (*suffix == 'G')
@@ -1100,10 +1099,7 @@ xenParseSxprVifRate(const char *rate, unsigned long long *kbytes_per_sec)
        tmp /= 8;
 
     *kbytes_per_sec = tmp;
-    ret = 0;
-
- cleanup:
-    return ret;
+    return 0;
 }
 
 
-- 
2.21.0

--
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