mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-25 14:05:18 +00:00
esx: eliminate unnecessary labels
Signed-off-by: Laine Stump <laine@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
c02a08ec5a
commit
e54bb482a1
@ -369,7 +369,7 @@ int
|
|||||||
esxVI_CURL_Download(esxVI_CURL *curl, const char *url, char **content,
|
esxVI_CURL_Download(esxVI_CURL *curl, const char *url, char **content,
|
||||||
unsigned long long offset, unsigned long long *length)
|
unsigned long long offset, unsigned long long *length)
|
||||||
{
|
{
|
||||||
char *range = NULL;
|
g_autofree char *range = NULL;
|
||||||
g_auto(virBuffer) buffer = VIR_BUFFER_INITIALIZER;
|
g_auto(virBuffer) buffer = VIR_BUFFER_INITIALIZER;
|
||||||
int responseCode = 0;
|
int responseCode = 0;
|
||||||
|
|
||||||
@ -405,12 +405,12 @@ esxVI_CURL_Download(esxVI_CURL *curl, const char *url, char **content,
|
|||||||
virMutexUnlock(&curl->lock);
|
virMutexUnlock(&curl->lock);
|
||||||
|
|
||||||
if (responseCode < 0) {
|
if (responseCode < 0) {
|
||||||
goto cleanup;
|
return -1;
|
||||||
} else if (responseCode != 200 && responseCode != 206) {
|
} else if (responseCode != 200 && responseCode != 206) {
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
_("HTTP response code %d for download from '%s'"),
|
_("HTTP response code %d for download from '%s'"),
|
||||||
responseCode, url);
|
responseCode, url);
|
||||||
goto cleanup;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (length)
|
if (length)
|
||||||
@ -418,9 +418,6 @@ esxVI_CURL_Download(esxVI_CURL *curl, const char *url, char **content,
|
|||||||
|
|
||||||
*content = virBufferContentAndReset(&buffer);
|
*content = virBufferContentAndReset(&buffer);
|
||||||
|
|
||||||
cleanup:
|
|
||||||
VIR_FREE(range);
|
|
||||||
|
|
||||||
if (!(*content))
|
if (!(*content))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user