aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist_database.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-12-23 16:16:01 +0100
committerMax Kellermann <max@duempel.org>2010-12-23 16:23:20 +0100
commit5462f34ed037111d2d57638352b2f1a65a322579 (patch)
treed1acf3493d2d8edbbda9ae77a327d26ae249f3f9 /src/playlist_database.c
parent0958ed584431ac09e676dd51925e56142416e7c2 (diff)
downloadmpd-5462f34ed037111d2d57638352b2f1a65a322579.tar.gz
mpd-5462f34ed037111d2d57638352b2f1a65a322579.tar.xz
mpd-5462f34ed037111d2d57638352b2f1a65a322579.zip
string_util: add function strchug_fast()
Replace g_strchug() calls with a cheaper implementation.
Diffstat (limited to '')
-rw-r--r--src/playlist_database.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/playlist_database.c b/src/playlist_database.c
index 0a8a6f139..97da1c98e 100644
--- a/src/playlist_database.c
+++ b/src/playlist_database.c
@@ -21,6 +21,7 @@
#include "playlist_database.h"
#include "playlist_vector.h"
#include "text_file.h"
+#include "string_util.h"
#include <string.h>
#include <stdlib.h>
@@ -62,7 +63,7 @@ playlist_metadata_load(FILE *fp, struct playlist_vector *pv, const char *name,
}
*colon++ = 0;
- value = g_strchug(colon);
+ value = strchug_fast_c(colon);
if (strcmp(line, "mtime") == 0)
pm.mtime = strtol(value, NULL, 10);