mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-28 10:50:23 +03:00
remote: DeserializeDomainDiskErrors: remove dead code
As of commit b2d079c113a which converted this function to use g_strdup, the error label is only reached when i = 0, rendering it useless. Remove it. Fixes: https://gitlab.com/libvirt/libvirt/-/issues/572 Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
405f479d0e
commit
49f1406de8
@ -1641,12 +1641,11 @@ remoteDeserializeDomainDiskErrors(remote_domain_disk_error *ret_errors_val,
|
||||
int maxerrors)
|
||||
{
|
||||
size_t i = 0;
|
||||
size_t j;
|
||||
|
||||
if (ret_errors_len > limit || ret_errors_len > maxerrors) {
|
||||
virReportError(VIR_ERR_RPC, "%s",
|
||||
_("returned number of disk errors exceeds limit"));
|
||||
goto error;
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (i = 0; i < ret_errors_len; i++) {
|
||||
@ -1655,12 +1654,6 @@ remoteDeserializeDomainDiskErrors(remote_domain_disk_error *ret_errors_val,
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
error:
|
||||
for (j = 0; j < i; j++)
|
||||
VIR_FREE(errors[j].disk);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int
|
||||
|
Loading…
x
Reference in New Issue
Block a user