Re: [patch 6/6] gdbserver build-id attribute generator

Aleksandar Ristovski
2013-03-27T14:39:22Z

On 13-03-26 04:41 PM, Jan Kratochvil wrote:
>> >+
>> >+ if (build_id_list_p)
>> >+ qsort (VEC_address (build_id_list_s, data.list),
>> >+ VEC_length (build_id_list_s, data.list),
>> >+ sizeof (build_id_list_s), compare_build_id_list);
> It is always already sorted by Linux kernel, rather a for cycle to verify it
> really is sorted.
>
>

Can we guarantee this is always the case? Even if it is, qsort would do
similar to what a loop would (i.e. no moves would take place).

I'd leave it with qsort unless you feel strongly about it.