From de58f7f8a3dc25380dc4619171e56e1b80153987 Mon Sep 17 00:00:00 2001 From: Tollef Fog Heen Date: Sun, 20 Jul 2008 19:18:56 +0200 Subject: [PATCH] Rename inv_alphasort to acmp and make it not invert the return code of strcoll; this makes us sort in ascending order --- src/filters.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/filters.c b/src/filters.c index b09ff557..de72aef0 100644 --- a/src/filters.c +++ b/src/filters.c @@ -90,8 +90,8 @@ loadfilter(const char *fn) ohshite(_("error closing configuration file '%.255s'"), fn); } -static int inv_alphasort(const void *a, const void *b) { - return -1 * strcoll((char*)a, (char*) b); +static int acmp(const void *a, const void *b) { + return strcoll((char*)a, (char*) b); } void @@ -129,7 +129,7 @@ loadfilters(void) } free(file); } - qsort(names, i, sizeof(char *), inv_alphasort); + qsort(names, i, sizeof(char *), acmp); while (i > 0) { loadfilter(names[--i]); free(names[i]); -- 2.39.5