diff options
author | Søren Sandmann Pedersen <ssp@redhat.com> | 2011-03-22 13:42:05 -0400 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@redhat.com> | 2011-03-22 13:43:29 -0400 |
commit | ad3cbfb073fc325e1b3152898ca71b8255675957 (patch) | |
tree | 1bb453e36cfbafb9f595cbe8b48d8c23bbde7c70 /test | |
parent | b514e63cfc58af21f7097db5a1b04292a758782a (diff) |
test: Fix infinite loop in composite
When run in PIXMAN_RANDOMIZE_TESTS mode, this test would go into an
infinite loop because the loop started at 'seed' but the stop
condition was still N_TESTS.
Diffstat (limited to 'test')
-rw-r--r-- | test/composite.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/composite.c b/test/composite.c index b0e0ba4..9a001e5 100644 --- a/test/composite.c +++ b/test/composite.c @@ -909,13 +909,13 @@ main (int argc, char **argv) #ifdef USE_OPENMP # pragma omp parallel for default(none) shared(result, argv, seed) #endif - for (i = seed; i <= N_TESTS; ++i) + for (i = 0; i <= N_TESTS; ++i) { - if (!result && !run_test (i)) + if (!result && !run_test (i + seed)) { - printf ("Test 0x%08X failed.\n", i); + printf ("Test 0x%08X failed.\n", seed + i); - result = i; + result = seed + i; } } |