Sort the task list by pid, as we're going to use bsearch() (bug 14403)

This commit is contained in:
Landry Breuil
2018-05-26 23:52:46 +02:00
parent 704411a38b
commit 159c3c1d0c
5 changed files with 10 additions and 0 deletions

View File

@@ -151,6 +151,8 @@ gboolean get_task_list (GArray *task_list)
}
free(kp);
g_array_sort (task_list, task_pid_compare_fn);
return TRUE;
}

View File

@@ -234,6 +234,8 @@ get_task_list (GArray *task_list)
kvm_close (kd);
g_array_sort (task_list, task_pid_compare_fn);
return TRUE;
}

View File

@@ -333,6 +333,8 @@ get_task_list (GArray *task_list)
g_dir_close (dir);
g_array_sort (task_list, task_pid_compare_fn);
return TRUE;
}

View File

@@ -75,6 +75,8 @@ get_task_list (GArray *task_list)
}
}
g_array_sort (task_list, task_pid_compare_fn);
return TRUE;
}

View File

@@ -227,6 +227,8 @@ get_task_list (GArray *task_list)
g_dir_close (dir);
g_array_sort (task_list, task_pid_compare_fn);
return FALSE;
}