From: Ján Tomko Date: Wed, 13 Nov 2019 12:09:11 +0000 (+0100) Subject: libxl: remove 'ret' from xenParseSxprVifRate X-Git-Tag: v5.10.0-rc1~192 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=815db3ea58e4c1d270f1fa5cf2664f0745893d21;p=thirdparty%2Flibvirt.git libxl: remove 'ret' from xenParseSxprVifRate Now that the cleanup section is empty, the ret variable is no longer necessary. Signed-off-by: Ján Tomko Reviewed-by: Peter Krempa --- diff --git a/src/libxl/xen_common.c b/src/libxl/xen_common.c index 7dd06b67c3..b6c96799d9 100644 --- a/src/libxl/xen_common.c +++ b/src/libxl/xen_common.c @@ -1067,7 +1067,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); @@ -1085,13 +1084,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') @@ -1103,10 +1102,7 @@ xenParseSxprVifRate(const char *rate, unsigned long long *kbytes_per_sec) tmp /= 8; *kbytes_per_sec = tmp; - ret = 0; - - cleanup: - return ret; + return 0; }