summaryrefslogtreecommitdiffstats
path: root/source/history.c
diff options
context:
space:
mode:
authorQC <qball@gmpclient.org>2015-07-05 09:47:55 +0200
committerQC <qball@gmpclient.org>2015-07-05 09:47:55 +0200
commitf88cfacfde7719cdaba2528b8d1f98c4674d2e94 (patch)
treea9b19a1882b7c431fb7a51137d389ba955c28467 /source/history.c
parentdc356d81c4869af46f20487579f89c9c853c9f04 (diff)
Replace all qsorts.
Diffstat (limited to 'source/history.c')
-rw-r--r--source/history.c4
1 files changed, 2 insertions, 2 deletions
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;