diff options
| author | Leandro Pereira <leandro@hardinfo.org> | 2020-05-09 13:39:45 -0700 | 
|---|---|---|
| committer | Leandro Pereira <leandro@hardinfo.org> | 2020-05-09 13:40:13 -0700 | 
| commit | 21558e4c5b47a934904c376a13c9eb74bcc0246a (patch) | |
| tree | d8121d81bf0ea5ba7afe6d2509ccbc4b2ebf9ef3 /modules | |
| parent | d6a97ba11b566c412077c76c29e0281eda7b7359 (diff) | |
GSList will be sorted anyway, so prepend rather than append
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/benchmark.c | 6 | 
1 files changed, 4 insertions, 2 deletions
| diff --git a/modules/benchmark.c b/modules/benchmark.c index a2b975bc..02cb9085 100644 --- a/modules/benchmark.c +++ b/modules/benchmark.c @@ -543,7 +543,7 @@ static gchar *benchmark_include_results_internal(bench_value this_machine_value,                                                   const gchar *benchmark,                                                   ShellOrderType order_type)  { -    bench_result *this_machine = NULL; +    bench_result *this_machine;      GSList *result_list, *li;      gchar *results = g_strdup("");      gchar *output; @@ -565,7 +565,9 @@ static gchar *benchmark_include_results_internal(bench_value this_machine_value,      /* this result */      if (this_machine_value.result > 0.0) {          this_machine = bench_result_this_machine(benchmark, this_machine_value); -        result_list = g_slist_append(result_list, this_machine); +        result_list = g_slist_prepend(result_list, this_machine); +    } else { +        this_machine = NULL;      }      /* sort */ | 
