diff options
author | Max Kellermann <max@duempel.org> | 2008-10-28 20:33:56 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-28 20:33:56 +0100 |
commit | 016d996131d560db6d72476ae29c74df84746fff (patch) | |
tree | c22a7d13e1b39927e70e73cbc8f78762fba0d92a /src/database.c | |
parent | 4a71f66256d02c46bc2bb3665cc6451a2101d5ac (diff) | |
download | mpd-016d996131d560db6d72476ae29c74df84746fff.tar.gz mpd-016d996131d560db6d72476ae29c74df84746fff.tar.xz mpd-016d996131d560db6d72476ae29c74df84746fff.zip |
utils: use g_str_has_prefix() instead of prefixcmp()
Remove duplicated code from MPD.
Diffstat (limited to '')
-rw-r--r-- | src/database.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/database.c b/src/database.c index 74a3a3e3c..2fd61dd08 100644 --- a/src/database.c +++ b/src/database.c @@ -280,11 +280,11 @@ db_load(void) while (myFgets(buffer, sizeof(buffer), fp) && 0 != strcmp(DIRECTORY_INFO_END, buffer)) { - if (!prefixcmp(buffer, DIRECTORY_MPD_VERSION)) { + if (g_str_has_prefix(buffer, DIRECTORY_MPD_VERSION)) { if (foundVersion) FATAL("already found version in db\n"); foundVersion = 1; - } else if (!prefixcmp(buffer, DIRECTORY_FS_CHARSET)) { + } else if (g_str_has_prefix(buffer, DIRECTORY_FS_CHARSET)) { char *fsCharset; char *tempCharset; |