From: Matthias Bolte Date: Wed, 7 Apr 2010 08:55:00 +0000 (+0200) Subject: esx: Report an error for invalid arguments in esxList(Defined)Domains X-Git-Tag: v0.8.0~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fba503c368ab9afe515261b2c8260eacf9689754;p=thirdparty%2Flibvirt.git esx: Report an error for invalid arguments in esxList(Defined)Domains --- diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c index 888ac10b59..aed4a626a1 100644 --- a/src/esx/esx_driver.c +++ b/src/esx/esx_driver.c @@ -964,7 +964,8 @@ esxListDomains(virConnectPtr conn, int *ids, int maxids) int count = 0; if (ids == NULL || maxids < 0) { - goto failure; + ESX_ERROR(VIR_ERR_INVALID_ARG, "%s", _("Invalid argument")); + return -1; } if (maxids == 0) { @@ -2255,7 +2256,8 @@ esxListDefinedDomains(virConnectPtr conn, char **const names, int maxnames) int i; if (names == NULL || maxnames < 0) { - goto failure; + ESX_ERROR(VIR_ERR_INVALID_ARG, "%s", _("Invalid argument")); + return -1; } if (maxnames == 0) {