Skip to content
Commit f8cfb683 authored by Florian Weimer's avatar Florian Weimer
Browse files

stdlib: Avoid element self-comparisons in qsort



This improves compatibility with applications which assume that qsort
does not invoke the comparison function with equal pointer arguments.

The newly introduced branches should be predictable, as leading to a
call to the comparison function.  If the prediction fails, we avoid
calling the function.

Reviewed-by: default avatarAdhemerval Zanella <adhemerval.zanella@linaro.org>
parent bf033c00
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment