On 11/02/2011 02:00 PM, Eric Blake wrote:
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;
- }
Following the note on the top of this mail, this seems not even to be
possible (and hopefully never will be).
strcpy(params[0].field, VIR_DOMAIN_SCHEDULER_WEIGHT);
Someone is still using strcpy!
params[0].type = VIR_TYPED_PARAM_UINT;
/* XXX */
ACK
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list