These functions can't fail really. Drop checking of their retval
then.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/vmx/vmx.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c
index 0d1d87bac6..6f47546edf 100644
--- a/src/vmx/vmx.c
+++ b/src/vmx/vmx.c
@@ -2081,8 +2081,7 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt,
virConfPtr con
goto cleanup;
}
- if (virAsprintf(&prefix, "scsi%d:%d", controllerOrBus, unit)
< 0)
- goto cleanup;
+ virAsprintf(&prefix, "scsi%d:%d", controllerOrBus, unit);
(*def)->dst =
virIndexToDiskName
@@ -2104,8 +2103,7 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt,
virConfPtr con
goto cleanup;
}
- if (virAsprintf(&prefix, "ide%d:%d", controllerOrBus, unit)
< 0)
- goto cleanup;
+ virAsprintf(&prefix, "ide%d:%d", controllerOrBus, unit);
(*def)->dst = virIndexToDiskName(controllerOrBus * 2 + unit,
"hd");
@@ -2134,8 +2132,7 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt,
virConfPtr con
goto cleanup;
}
- if (virAsprintf(&prefix, "floppy%d", unit) < 0)
- goto cleanup;
+ virAsprintf(&prefix, "floppy%d", unit);
(*def)->dst = virIndexToDiskName(unit, "fd");
@@ -2842,9 +2839,7 @@ virVMXParseSerial(virVMXContext *ctx, virConfPtr conf, int port,
(*def)->source->data.tcp.host = g_strdup(parsedUri->server);
- if (virAsprintf(&(*def)->source->data.tcp.service, "%d",
- parsedUri->port) < 0)
- goto cleanup;
+ virAsprintf(&(*def)->source->data.tcp.service, "%d",
parsedUri->port);
/* See vSphere API documentation about VirtualSerialPortURIBackingInfo */
if (parsedUri->scheme == NULL ||
--
2.21.0