tools/tests: fix an xs-test.c issue
PATCH 1/1 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 <[email protected]>
Signed-off-by Wei Liu <[email protected]>
--- tools/tests/xenstore/xs-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/tests/xenstore/xs-test.c +1 -1
@@ -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 ;
Signature · 7 lines
2.11.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Wei Liu writes ("[PATCH] tools/tests: fix an xs-test.c issue"):
Quoted 2 lines
The ret variable can be used uninitialised when iters is 0. Initialise ret at the beginning to fix this issue.
Acked-by Ian Jackson <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel