[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).
This commit is contained in:
Chris Wilson 2007-10-24 18:35:41 +01:00
parent 38c779e7d6
commit 1651359ffb

View file

@ -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)
{