On 11/12/19 1:42 PM, Ján Tomko wrote:
On Mon, Oct 21, 2019 at 03:19:03PM -0300, Daniel Henrique Barboza wrote:
Signed-off-by: Daniel Henrique Barboza <danielhb413@xxxxxxxxx>
---
src/vbox/vbox_common.c | 12 +++---
src/vbox/vbox_snapshot_conf.c | 75 +++++++++++++++--------------------
2 files changed, 36 insertions(+), 51 deletions(-)
diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c
index 475b3a3147..5ea9ef627d 100644
--- a/src/vbox/vbox_common.c
+++ b/src/vbox/vbox_common.c
@@ -2202,21 +2202,21 @@ static int
vboxDomainCreateWithFlags(virDomainPtr dom, unsigned int flags)
int ret = -1;
if (!data->vboxObj)
- return ret;
+ return -1;
virCheckFlags(0, -1);
if (!dom->name) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Error while reading the domain name"));
- goto cleanup;
+ return -1;
}
rc = gVBoxAPI.UArray.vboxArrayGet(&machines, data->vboxObj,
ARRAY_GET_MACHINES);
if (NS_FAILED(rc)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Could not get list of machines, rc=%08x"),
(unsigned)rc);
- goto cleanup;
+ return -1;
}
for (i = 0; i < machines.count; ++i) {
@@ -2260,7 +2260,6 @@ static int
vboxDomainCreateWithFlags(virDomainPtr dom, unsigned int flags)
/* Do the cleanup and take care you dont leak any memory */
gVBoxAPI.UArray.vboxArrayRelease(&machines);
- cleanup:
return ret;
}
@@ -2755,13 +2754,13 @@ static int vboxDomainGetInfo(virDomainPtr dom,
virDomainInfoPtr info)
int ret = -1;
if (!data->vboxObj)
- return ret;
+ return -2;
How did you come up with -2 here?
This was a typo that slipped through and I didn't notice. There's no
"ret = -2" anywhere in this function.
DHB
Jano
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list