if (managedObjectReference == NULL) {
if (occurrence == esxVI_Occurrence_OptionalItem) {
- return 0;
+ result = 0;
+
+ goto cleanup;
} else {
ESX_VI_ERROR(VIR_ERR_NO_DOMAIN,
_("Could not find domain with UUID '%s'"),
if (*virtualMachine == NULL) {
if (occurrence == esxVI_Occurrence_OptionalItem) {
- return 0;
+ result = 0;
+
+ goto cleanup;
} else {
ESX_VI_ERROR(VIR_ERR_NO_DOMAIN,
_("Could not find domain with name '%s'"), name);
goto cleanup;
}
- // Found datastore with matching name
- goto success;
+ /* Found datastore with matching name */
+ result = 0;
+
+ goto cleanup;
}
}
goto cleanup;
}
- success:
result = 0;
cleanup:
}
/* Found datastore with matching mount path */
- goto success;
+ result = 0;
+
+ goto cleanup;
}
}
}
goto cleanup;
}
- success:
result = 0;
cleanup:
if (currentSnapshot == NULL) {
if (occurrence == esxVI_Occurrence_OptionalItem) {
- return 0;
+ result = 0;
+
+ goto cleanup;
} else {
ESX_VI_ERROR(VIR_ERR_NO_DOMAIN_SNAPSHOT, "%s",
_("Domain has no current snapshot"));