[libvirt] [PATCH] test: ensure nerrors variable is initialized

4 Jul
2019
4 Jul
'19
9:23 a.m.
There is an error path that jumps over the initialization of nerrors, and the jump target reads the variable contents. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> --- Pushed as a build fix src/test/test_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index ce4ff1a582..2371581f51 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -3275,7 +3275,7 @@ static int testDomainGetDiskErrors(virDomainPtr dom, virDomainObjPtr vm = NULL; int ret = -1; size_t i; - size_t nerrors; + size_t nerrors = 0; virCheckFlags(0, -1); -- 2.21.0
2264
Age (days ago)
2264
Last active (days ago)
0 comments
1 participants
participants (1)
-
Daniel P. Berrangé