Fixed compare function.
authorSebastian Hack <hack@ipd.info.uni-karlsruhe.de>
Tue, 7 Aug 2007 13:48:14 +0000 (13:48 +0000)
committerSebastian Hack <hack@ipd.info.uni-karlsruhe.de>
Tue, 7 Aug 2007 13:48:14 +0000 (13:48 +0000)
Beware of subtraction and usinged variables!

[r15492]

ir/be/bespillbelady2.c

index e6e0bb8..6551b1a 100644 (file)
@@ -122,7 +122,7 @@ static int loc_compare(const void *a, const void *b)
 {
        const loc_t *p = a;
        const loc_t *q = b;
-       return (int) p->time - (int) q->time;
+       return (p->time > q->time) - (p->time < q->time);
 }
 
 static INLINE void workset_print(const workset_t *w)