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

[Xen-changelog] [xen staging] tools/tests: fix an xs-test.c issue



commit 3a2b8525b883baa87fe89b3da58f5c09fa599b99
Author:     Wei Liu <wei.liu2@xxxxxxxxxx>
AuthorDate: Mon Aug 20 09:38:18 2018 +0100
Commit:     Wei Liu <wei.liu2@xxxxxxxxxx>
CommitDate: Mon Aug 20 11:50:17 2018 +0100

    tools/tests: fix an xs-test.c issue
    
    The ret variable can be used uninitialised when iters is 0. Initialise
    ret at the beginning to fix this issue.
    
    Reported-by: Steven Haigh <netwiz@xxxxxxxxx>
    Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
    Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 tools/tests/xenstore/xs-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/tests/xenstore/xs-test.c b/tools/tests/xenstore/xs-test.c
index 17d4a66b85..c4c99c0661 100644
--- a/tools/tests/xenstore/xs-test.c
+++ b/tools/tests/xenstore/xs-test.c
@@ -66,7 +66,7 @@ static int call_test(struct test *tst, int iters, bool 
no_clock)
     char *stage = "?";
     struct timespec tp1, tp2;
     uint64_t nsec, nsec_min, nsec_max, nsec_sum;
-    int i, ret;
+    int i, ret = 0;
 
     nsec_min = -1;
     nsec_max = 0;
--
generated by git-patchbot for /home/xen/git/xen.git#staging

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.