corrections from Mouse:

On Mon, Dec 09, 2013 at 07:02:39AM +0000, David Holland wrote:
 > (2) union of function pointers
 >
 >            r = is_r ? cmpu.cmp(a, b) : cmpu.cmp_r(a, b, data);

this test is backwards.

 >   void
 >   sort(void *p, size_t n, size_t sz, int (*cmp)(const void *, const void *))
 >   {
 >           union sort cmpu = { .cmp = cmp };
 >           sort_internal(p, n, sz, true, cmpu, NULL);
                                     ^^^^
and that should be "false".

sigh. pseudocode...

-- 
David A. Holland
dholl...@netbsd.org

Reply via email to