[PATCH] manual: Correct guarantee about pointers compared by qsort()

Florian Weimer fweimer@redhat.com
Thu Dec 11 10:25:00 GMT 2014


On 12/11/2014 10:57 AM, Anders Kaseorg wrote:
> +Although the object addresses passed to the comparison function lie
> +within the array, they need not correspond with the original locations
> +of those objects, because the sorting algorithm may swap around

No comma before “because”.

> +objects in the array before making some comparisons.  The only way to
> +perform a stable sort with @var{qsort} is to first augment the objects
> +with a monotonic counter of some kind.

“@code{qsort}” instead of “@var{qsort}”.

Otherwise looks fine.

-- 
Florian Weimer / Red Hat Product Security



More information about the Libc-alpha mailing list