diff options
author | Max Kellermann <max@duempel.org> | 2008-11-07 16:37:32 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-11-07 16:37:32 +0100 |
commit | 16cdf44ebbe9b69336b47932c222066a7e97743f (patch) | |
tree | 6027b201257aaf5d332b968f1aa0c63f94927f05 /src/mpdclient.c | |
parent | 521a026319775913bf828aa1c2de5ce5d717811c (diff) | |
download | mpd-16cdf44ebbe9b69336b47932c222066a7e97743f.tar.gz mpd-16cdf44ebbe9b69336b47932c222066a7e97743f.tar.xz mpd-16cdf44ebbe9b69336b47932c222066a7e97743f.zip |
mpdclient: use g_utf8_collate()
Use one g_utf8_collate() call instead of g_utf8_collate_key() twice
plus strcmp().
Diffstat (limited to '')
-rw-r--r-- | src/mpdclient.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/mpdclient.c b/src/mpdclient.c index 3da280cef..b5e953a90 100644 --- a/src/mpdclient.c +++ b/src/mpdclient.c @@ -47,7 +47,6 @@ compare_filelistentry_dir(gconstpointer filelist_entry1, gconstpointer filelist_entry2) { const mpd_InfoEntity *e1, *e2; - char *key1, *key2; int n = 0; e1 = ((const filelist_entry_t *)filelist_entry1)->entity; @@ -55,13 +54,9 @@ compare_filelistentry_dir(gconstpointer filelist_entry1, if (e1 && e2 && e1->type == MPD_INFO_ENTITY_TYPE_DIRECTORY && - e2->type == MPD_INFO_ENTITY_TYPE_DIRECTORY) { - key1 = g_utf8_collate_key(e1->info.directory->path,-1); - key2 = g_utf8_collate_key(e2->info.directory->path,-1); - n = strcmp(key1,key2); - g_free(key1); - g_free(key2); - } + e2->type == MPD_INFO_ENTITY_TYPE_DIRECTORY) + n = g_utf8_collate(e1->info.directory->path, + e2->info.directory->path); return n; } |