mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
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@crc.id.au> Signed-off-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
This commit is contained in:
1 parent
48a70499e6
commit
3a2b8525b8
1 file changed
+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;
|
||||
|
||||