From f88cfacfde7719cdaba2528b8d1f98c4674d2e94 Mon Sep 17 00:00:00 2001 From: QC Date: Sun, 5 Jul 2015 09:47:55 +0200 Subject: Replace all qsorts. --- source/history.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/history.c') diff --git a/source/history.c b/source/history.c index 68ac36b5..b86a0816 100644 --- a/source/history.c +++ b/source/history.c @@ -43,7 +43,7 @@ typedef struct __element char name[HISTORY_NAME_LENGTH]; }_element; -static int __element_sort_func ( const void *ea, const void *eb ) +static int __element_sort_func ( const void *ea, const void *eb, void *data __attribute__( ( unused ) ) ) { _element *a = *(_element * *) ea; _element *b = *(_element * *) eb; @@ -56,7 +56,7 @@ static void __history_write_element_list ( FILE *fd, _element **list, unsigned i return; } // Sort the list before writing out. - qsort ( list, length, sizeof ( _element* ), __element_sort_func ); + g_qsort_with_data ( list, length, sizeof ( _element* ), __element_sort_func, NULL ); // Get minimum index. int min_value = list[length - 1]->index; -- cgit v1.2.3