change comparison function to be consistent.

(now qsort on sunos should stop crashing.)
This commit is contained in:
rsc 2005-01-04 21:25:48 +00:00
parent 0daf9c0941
commit 4bd8ec4c1c

View file

@ -282,7 +282,7 @@ compar(NDir *a, NDir *b)
i = strcmp(ad->name, bd->name);
}
if(i == 0)
i = (a<b? -1 : 1);
i = (ad<bd? -1 : 1);
if(rflag)
i = -i;
return i;