]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
esx: Remove duplicated invalid-argument checks
authorMatthias Bolte <matthias.bolte@googlemail.com>
Tue, 7 Jun 2011 07:35:03 +0000 (09:35 +0200)
committerMatthias Bolte <matthias.bolte@googlemail.com>
Tue, 7 Jun 2011 13:21:47 +0000 (15:21 +0200)
Those checks are already performed at the public API level.

src/esx/esx_driver.c
src/esx/esx_storage_driver.c

index 500dc5287778207dffd3d201eca48af70fb41b00..a5b96a9785ee4c14885175d93f57e7c8af1dcef2 100644 (file)
@@ -1479,11 +1479,6 @@ esxListDomains(virConnectPtr conn, int *ids, int maxids)
     esxVI_VirtualMachinePowerState powerState;
     int count = 0;
 
-    if (ids == NULL || maxids < 0) {
-        ESX_ERROR(VIR_ERR_INVALID_ARG, "%s", _("Invalid argument"));
-        return -1;
-    }
-
     if (maxids == 0) {
         return 0;
     }
@@ -2895,11 +2890,6 @@ esxListDefinedDomains(virConnectPtr conn, char **const names, int maxnames)
     int count = 0;
     int i;
 
-    if (names == NULL || maxnames < 0) {
-        ESX_ERROR(VIR_ERR_INVALID_ARG, "%s", _("Invalid argument"));
-        return -1;
-    }
-
     if (maxnames == 0) {
         return 0;
     }
index 64619176b9f8744d1f99e0085392ca5e5ce50be2..c7fc992869b65d59db15ffa9df5e3b28190ec75f 100644 (file)
@@ -167,11 +167,6 @@ esxListStoragePools(virConnectPtr conn, char **const names, int maxnames)
     int count = 0;
     int i;
 
-    if (names == NULL || maxnames < 0) {
-        ESX_ERROR(VIR_ERR_INVALID_ARG, "%s", _("Invalid argument"));
-        return -1;
-    }
-
     if (maxnames == 0) {
         return 0;
     }