summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 521a026)
raw | patch | inline | side by side (parent: 521a026)
author | Max Kellermann <max@duempel.org> | |
Fri, 7 Nov 2008 15:37:32 +0000 (16:37 +0100) | ||
committer | Max Kellermann <max@duempel.org> | |
Fri, 7 Nov 2008 15:37:32 +0000 (16:37 +0100) |
Use one g_utf8_collate() call instead of g_utf8_collate_key() twice
plus strcmp().
plus strcmp().
src/mpdclient.c | patch | blob | history |
diff --git a/src/mpdclient.c b/src/mpdclient.c
index 3da280cefc588843b32f3dfa2e5096c24aa8b4a9..b5e953a90d4831de9e307e2ce074f252d0348254 100644 (file)
--- a/src/mpdclient.c
+++ b/src/mpdclient.c
gconstpointer filelist_entry2)
{
const mpd_InfoEntity *e1, *e2;
- char *key1, *key2;
int n = 0;
e1 = ((const filelist_entry_t *)filelist_entry1)->entity;
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;
}