tchange comparison function to be consistent. (now qsort on sunos should stop crashing.) - plan9port - [fork] Plan 9 from user space
HTML git clone git://src.adamsgaard.dk/plan9port
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit 4bd8ec4c1cf24fb1aff5d582cc0eaf58e8f8fd0e
DIR parent 0daf9c09417038872f2f8c43aac95dc10a035c3d
HTML Author: rsc <devnull@localhost>
Date: Tue, 4 Jan 2005 21:25:48 +0000
change comparison function to be consistent.
(now qsort on sunos should stop crashing.)
Diffstat:
M src/cmd/ls.C | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
DIR diff --git a/src/cmd/ls.C b/src/cmd/ls.C
t@@ -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;