提交 815db3ea 编写于 作者: J Ján Tomko

libxl: remove 'ret' from xenParseSxprVifRate

Now that the cleanup section is empty, the ret variable is no longer
necessary.
Signed-off-by: NJán Tomko <jtomko@redhat.com>
Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
上级 c4ac8e41
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册