]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
esx: Report an error for invalid arguments in esxList(Defined)Domains
authorMatthias Bolte <matthias.bolte@googlemail.com>
Wed, 7 Apr 2010 08:55:00 +0000 (10:55 +0200)
committerMatthias Bolte <matthias.bolte@googlemail.com>
Thu, 8 Apr 2010 09:58:33 +0000 (11:58 +0200)
src/esx/esx_driver.c

index 888ac10b59034632711c9735b5a8dc9aaecc0b60..aed4a626a11f68685a5f823c67d2deedba13883d 100644 (file)
@@ -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) {