mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +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>
(cherry picked from commit 3a2b8525b8)
This commit is contained in:
1 parent
a2e35a7592
commit
33664f9a05
1 file changed
+1
-1
@@ -65,7 +65,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;
|
||||
|
||||