]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
The formal behavior of qsort is unstable with regard to objects that
authorache <ache@FreeBSD.org>
Sat, 27 Aug 2016 14:43:13 +0000 (14:43 +0000)
committerache <ache@FreeBSD.org>
Sat, 27 Aug 2016 14:43:13 +0000 (14:43 +0000)
commitceacc6e98f2952c02ecd8f1fbcd339b8d4eefe5b
treed3ce463193145ce0a088d89a17dbb38bdf3ba3e7
parenta182989e661902a66f76fe15527cfcccb009abfe
The formal behavior of qsort is unstable with regard to objects that
are equal. Unfortunately, RFC 3484 requires that otherwise equal objects
remain in the order supplied by the DNS server. The present code attempts
to deal with this by returning -1 for objects that are equal (i.e.,
returns that the first parameter is less then the second parameter).
Unfortunately, the qsort API does not state that the first parameter
passed in is in any particular position in the list.

PR:     212122
Submitted by:   Herbie.Robinson@stratus.com
MFC after:      3 days
lib/libc/net/getaddrinfo.c