From: compudj Date: Thu, 19 Aug 2004 04:45:41 +0000 (+0000) Subject: make tree sort function better X-Git-Tag: v0.12.20~2676 X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;h=18e29396375ece6b003b1147d301728db337a44a;p=lttv.git make tree sort function better git-svn-id: http://ltt.polymtl.ca/svn@813 04897980-b3bd-0310-b5e0-8ef037075253 --- 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;