_("block_io_throttle field '%s' missing " \
"in qemu's output"), \
#STORE); \
- goto cleanup; \
+ return -1; \
}
static int
qemuMonitorJSONBlockIoThrottleInfo(virJSONValuePtr io_throttle,
const char *qdevid,
virDomainBlockIoTuneInfoPtr reply)
{
- int ret = -1;
size_t i;
bool found = false;
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("block_io_throttle device entry "
"was not in expected format"));
- goto cleanup;
+ return -1;
}
current_qdev = virJSONValueObjectGetString(temp_dev, "qdev");
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("block_io_throttle device entry "
"was not in expected format"));
- goto cleanup;
+ return -1;
}
if ((drivealias && current_drive && STRNEQ(current_drive, drivealias)) ||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("block_io_throttle inserted entry "
"was not in expected format"));
- goto cleanup;
+ return -1;
}
GET_THROTTLE_STATS("bps", total_bytes_sec);
GET_THROTTLE_STATS("bps_rd", read_bytes_sec);
virReportError(VIR_ERR_INTERNAL_ERROR,
_("cannot find throttling info for device '%s'"),
drivealias ? drivealias : qdevid);
- goto cleanup;
+ return -1;
}
- ret = 0;
- cleanup:
- return ret;
+ return 0;
}
#undef GET_THROTTLE_STATS
#undef GET_THROTTLE_STATS_OPTIONAL