From 18e29396375ece6b003b1147d301728db337a44a Mon Sep 17 00:00:00 2001 From: compudj Date: Thu, 19 Aug 2004 04:45:41 +0000 Subject: [PATCH] make tree sort function better git-svn-id: http://ltt.polymtl.ca/svn@813 04897980-b3bd-0310-b5e0-8ef037075253 --- .../poly/lttv/modules/gui/controlflow/processlist.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ltt/branches/poly/lttv/modules/gui/controlflow/processlist.c b/ltt/branches/poly/lttv/modules/gui/controlflow/processlist.c index 6629babc..55c82b6f 100644 --- a/ltt/branches/poly/lttv/modules/gui/controlflow/processlist.c +++ b/ltt/branches/poly/lttv/modules/gui/controlflow/processlist.c @@ -94,27 +94,27 @@ gint process_sort_func ( GtkTreeModel *model, if(a_pid == 0 && b_pid == 0) { /* If 0, order by CPU */ if(a_cpu > b_cpu) return 1; - if(a_cpu < b_cpu) return 0; + if(a_cpu < b_cpu) return -1; } else { /* if not 0, order by pid */ if(a_pid > b_pid) return 1; - if(a_pid < b_pid) return 0; + if(a_pid < b_pid) return -1; } /* Order by birth second */ if(a_birth_s > b_birth_s) return 1; - if(a_birth_s < b_birth_s) return 0; + if(a_birth_s < b_birth_s) return -1; /* Order by birth nanosecond */ if(a_birth_ns > b_birth_ns) return 1; - if(a_birth_ns < b_birth_ns) return 0; + if(a_birth_ns < b_birth_ns) return -1; /* Order by trace_num */ if(a_trace > b_trace) return 1; - if(a_trace < b_trace) return 0; + if(a_trace < b_trace) return -1; return 0; -- 2.34.1