make tree sort function better
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Thu, 19 Aug 2004 04:45:41 +0000 (04:45 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Thu, 19 Aug 2004 04:45:41 +0000 (04:45 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@813 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/lttv/modules/gui/controlflow/processlist.c

index 6629babc0f8f5a3dba19463635af1571acf904c8..55c82b6f0586f8ed31fce60adee0f049c3aa294c 100644 (file)
@@ -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;
 
This page took 0.024147 seconds and 4 git commands to generate.