[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH] esx: Remove duplicated invalid-argument checks



Those checks are already performed at the public API level.
---
 src/esx/esx_driver.c         |   10 ----------
 src/esx/esx_storage_driver.c |    5 -----
 2 files changed, 0 insertions(+), 15 deletions(-)

diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
index 500dc52..a5b96a9 100644
--- a/src/esx/esx_driver.c
+++ b/src/esx/esx_driver.c
@@ -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;
     }
diff --git a/src/esx/esx_storage_driver.c b/src/esx/esx_storage_driver.c
index 6461917..c7fc992 100644
--- a/src/esx/esx_storage_driver.c
+++ b/src/esx/esx_storage_driver.c
@@ -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;
     }
-- 
1.7.0.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]