]> Joshua Wise's Git repositories - tdl.git/commitdiff
Sorting by priority was wrong.
authorJoshua Wise <jwise@andrew.cmu.edu>
Tue, 22 Mar 2011 19:31:07 +0000 (15:31 -0400)
committerJoshua Wise <jwise@andrew.cmu.edu>
Tue, 22 Mar 2011 19:31:07 +0000 (15:31 -0400)
list.c

diff --git a/list.c b/list.c
index 450961c96b4c18d8d6b6b53c5d812311678f3029..87552feb67751c77b1c67701a7b5158e3edbba66 100644 (file)
--- a/list.c
+++ b/list.c
@@ -268,9 +268,9 @@ static void print_details(struct node *y, int indent, int summarise_kids, const
 /* 1 if x has lower priority than y. */
 static int node_lessthan(struct node *x, struct node *y)/*{{{*/
 {
 /* 1 if x has lower priority than y. */
 static int node_lessthan(struct node *x, struct node *y)/*{{{*/
 {
-  if (x->priority < y->priority)
-    return 1;
   if (x->priority > y->priority)
   if (x->priority > y->priority)
+    return 1;
+  if (x->priority < y->priority)
     return 0;
   if (x->required_by == 0 && y->required_by == 0)
     return (x->idx > y->idx);
     return 0;
   if (x->required_by == 0 && y->required_by == 0)
     return (x->idx > y->idx);
This page took 0.026852 seconds and 4 git commands to generate.