summaryrefslogtreecommitdiff
path: root/perf/cairo-perf-diff-files.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2007-10-24 18:35:41 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2007-10-24 19:33:19 +0100
commit1651359ffbda4c14eaf4e79b6deced4f2c247686 (patch)
tree471f9eeda8adee92d2b0e93c36cd72449c5adb18 /perf/cairo-perf-diff-files.c
parent38c779e7d672151d25cd596149485fcc9f21c298 (diff)
downloadcairo-1651359ffbda4c14eaf4e79b6deced4f2c247686.tar.gz
[cairo-perf-diff-files] Only use a valid initializer for min_test.
Do not assume that the tests[0] is a valid test, but instead scan for the first test that has a name (i.e. is not a terminator).
Diffstat (limited to 'perf/cairo-perf-diff-files.c')
-rw-r--r--perf/cairo-perf-diff-files.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/perf/cairo-perf-diff-files.c b/perf/cairo-perf-diff-files.c
index 05e3fa3bd..5fdf72d42 100644
--- a/perf/cairo-perf-diff-files.c
+++ b/perf/cairo-perf-diff-files.c
@@ -644,8 +644,13 @@ cairo_perf_reports_compare (cairo_perf_report_t *reports,
/* Find the minimum of all current tests, (we have to do this
* in case some reports don't have a particular test). */
- min_test = tests[0];
- for (i = 1; i < num_reports; i++) {
+ for (i = 0; i < num_reports; i++) {
+ if (tests[i]->name) {
+ min_test = tests[i];
+ break;
+ }
+ }
+ for (++i; i < num_reports; i++) {
if (tests[i]->name &&
test_report_cmp_backend_then_name (tests[i], min_test) < 0)
{