HomeFreeBSD

o Fix semantics of comparison function for qsort(3). According to qsort(3)
rS131101Unpublished

Unpublished Commit ยท Learn More

No further details are available.

Description

o Fix semantics of comparison function for qsort(3). According to qsort(3)

manpage:

   The comparison function must return an integer less than, equal to, or
   greater than zero if the first argument is considered to be respectively
   less than, equal to, or greater than the second.

Therefore, simply returning "arg1 > arg2" is incorrect. Actually it works
but for the number of items to be sorted less than 7 due to special case
handling in qsort(3);

o add missing '\n' to one of usage() calls.

Approved by: phk

Details

Provenance
sobomaxAuthored on
Parents
rS131100: Revert the last change. There are more 64bit platforms than amd64, and
Branches
Unknown
Tags
Unknown

Event Timeline