aboutsummaryrefslogtreecommitdiffstats
path: root/src/directory_save.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-11-01 15:54:06 +0100
committerMax Kellermann <max@duempel.org>2009-11-01 15:54:06 +0100
commit53a749780aec9904f1c04802e12f748c2c9e3eff (patch)
tree2c9788dc7d58bf0d267d363f1e1df0989dfb2019 /src/directory_save.c
parentc5040047020adb4139d7ed79659b326be4f7ffa4 (diff)
downloadmpd-53a749780aec9904f1c04802e12f748c2c9e3eff.tar.gz
mpd-53a749780aec9904f1c04802e12f748c2c9e3eff.tar.xz
mpd-53a749780aec9904f1c04802e12f748c2c9e3eff.zip
database: use strcmp() instead of g_str_has_prefix()
Diffstat (limited to '')
-rw-r--r--src/directory_save.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/directory_save.c b/src/directory_save.c
index ed4f0190f..cb740c0c8 100644
--- a/src/directory_save.c
+++ b/src/directory_save.c
@@ -123,7 +123,7 @@ directory_load_subdir(FILE *fp, struct directory *parent, const char *name,
}
}
- if (!g_str_has_prefix(line, DIRECTORY_BEGIN)) {
+ if (strcmp(line, DIRECTORY_BEGIN) != 0) {
g_set_error(error_r, directory_quark(), 0,
"Malformed line: %s", line);
directory_free(directory);
@@ -147,7 +147,7 @@ directory_load(FILE *fp, struct directory *directory,
bool success;
while ((line = read_text_line(fp, buffer)) != NULL &&
- !g_str_has_prefix(line, DIRECTORY_END)) {
+ strcmp(line, DIRECTORY_END) != 0) {
if (g_str_has_prefix(line, DIRECTORY_DIR)) {
struct directory *subdir =
directory_load_subdir(fp, directory,
@@ -157,7 +157,7 @@ directory_load(FILE *fp, struct directory *directory,
return false;
dirvec_add(&directory->children, subdir);
- } else if (g_str_has_prefix(line, SONG_BEGIN)) {
+ } else if (strcmp(line, SONG_BEGIN) == 0) {
success = songvec_load(fp, &directory->songs,
directory, buffer, error);
if (!success)