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

[libvirt] [PATCH 4/5] test: drop redundant check



libvirt.c guarantees that nparams is non-zero for scheduler parameters.

* src/test/test_driver.c (testDomainGetSchedulerParamsFlags): Drop
redundant check.
---
 src/test/test_driver.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 4e1973a..de0f716 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -2709,10 +2709,6 @@ testDomainGetSchedulerParamsFlags(virDomainPtr domain,
         goto cleanup;
     }

-    if (*nparams < 1) {
-        testError(VIR_ERR_INVALID_ARG, "%s", _("Invalid parameter count"));
-        goto cleanup;
-    }
     strcpy(params[0].field, VIR_DOMAIN_SCHEDULER_WEIGHT);
     params[0].type = VIR_TYPED_PARAM_UINT;
     /* XXX */
-- 
1.7.4.4


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