Since this function isn't doing any cleanup, the label is not necessary.
---
src/conf/domain_conf.c | 23 ++++++++++-------------
1 file changed, 10 insertions(+), 13 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index c2ac8d6..ac464d3 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -6688,7 +6688,7 @@ virDomainDiskDefIotuneParse(virDomainDiskDefPtr def,
if (ret == -2) {
virReportError(VIR_ERR_XML_ERROR, "%s",
_("total throughput limit must be an integer"));
- goto error;
+ return -1;
} else if (ret < 0) {
def->blkdeviotune.total_bytes_sec = 0;
}
@@ -6699,7 +6699,7 @@ virDomainDiskDefIotuneParse(virDomainDiskDefPtr def,
if (ret == -2) {
virReportError(VIR_ERR_XML_ERROR, "%s",
_("read throughput limit must be an integer"));
- goto error;
+ return -1;
} else if (ret < 0) {
def->blkdeviotune.read_bytes_sec = 0;
}
@@ -6710,7 +6710,7 @@ virDomainDiskDefIotuneParse(virDomainDiskDefPtr def,
if (ret == -2) {
virReportError(VIR_ERR_XML_ERROR, "%s",
_("write throughput limit must be an integer"));
- goto error;
+ return -1;
} else if (ret < 0) {
def->blkdeviotune.write_bytes_sec = 0;
}
@@ -6721,7 +6721,7 @@ virDomainDiskDefIotuneParse(virDomainDiskDefPtr def,
if (ret == -2) {
virReportError(VIR_ERR_XML_ERROR, "%s",
_("total I/O operations limit must be an integer"));
- goto error;
+ return -1;
} else if (ret < 0) {
def->blkdeviotune.total_iops_sec = 0;
}
@@ -6732,7 +6732,7 @@ virDomainDiskDefIotuneParse(virDomainDiskDefPtr def,
if (ret == -2) {
virReportError(VIR_ERR_XML_ERROR, "%s",
_("read I/O operations limit must be an integer"));
- goto error;
+ return -1;
} else if (ret < 0) {
def->blkdeviotune.read_iops_sec = 0;
}
@@ -6743,7 +6743,7 @@ virDomainDiskDefIotuneParse(virDomainDiskDefPtr def,
if (ret == -2) {
virReportError(VIR_ERR_XML_ERROR, "%s",
_("write I/O operations limit must be an integer"));
- goto error;
+ return -1;
} else if (ret < 0) {
def->blkdeviotune.write_iops_sec = 0;
}
@@ -6798,7 +6798,7 @@ virDomainDiskDefIotuneParse(virDomainDiskDefPtr def,
virReportError(VIR_ERR_XML_ERROR, "%s",
_("total and read/write bytes_sec "
"cannot be set at the same time"));
- goto error;
+ return -1;
}
if ((def->blkdeviotune.total_iops_sec &&
@@ -6808,7 +6808,7 @@ virDomainDiskDefIotuneParse(virDomainDiskDefPtr def,
virReportError(VIR_ERR_XML_ERROR, "%s",
_("total and read/write iops_sec "
"cannot be set at the same time"));
- goto error;
+ return -1;
}
if ((def->blkdeviotune.total_bytes_sec_max &&
@@ -6818,7 +6818,7 @@ virDomainDiskDefIotuneParse(virDomainDiskDefPtr def,
virReportError(VIR_ERR_XML_ERROR, "%s",
_("total and read/write bytes_sec_max "
"cannot be set at the same time"));
- goto error;
+ return -1;
}
if ((def->blkdeviotune.total_iops_sec_max &&
@@ -6828,13 +6828,10 @@ virDomainDiskDefIotuneParse(virDomainDiskDefPtr def,
virReportError(VIR_ERR_XML_ERROR, "%s",
_("total and read/write iops_sec_max "
"cannot be set at the same time"));
- goto error;
+ return -1;
}
return 0;
-
- error:
- return ret;
}
--
2.8.0