aboutsummaryrefslogtreecommitdiffstats
path: root/src/ls.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-13 16:30:44 +0200
committerMax Kellermann <max@duempel.org>2008-10-13 16:30:44 +0200
commitbc85e92a722d945d193c9f3881e4ee9f96c8f2b6 (patch)
treea09dabcccbd447ea1bb162047ae8090a24376a7a /src/ls.c
parent07c9b62764c2704380338dd26db7dc4d9b67dc2e (diff)
downloadmpd-bc85e92a722d945d193c9f3881e4ee9f96c8f2b6.tar.gz
mpd-bc85e92a722d945d193c9f3881e4ee9f96c8f2b6.tar.xz
mpd-bc85e92a722d945d193c9f3881e4ee9f96c8f2b6.zip
playlist: don't use isPlaylist() in deletePlaylist()
The only caller of deletePlaylist() appends PLAYLIST_FILE_SUFFIX, so we can be sure it's already there. We don't need to stat the file, since unlink() does all the checking.
Diffstat (limited to 'src/ls.c')
-rw-r--r--src/ls.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/ls.c b/src/ls.c
index de42e3f8c..01614710f 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -228,22 +228,6 @@ const char *getSuffix(const char *utf8file)
return ret;
}
-static int hasSuffix(const char *utf8file, const char *suffix)
-{
- const char *s = getSuffix(utf8file);
- if (s && 0 == strcmp(s, suffix))
- return 1;
- return 0;
-}
-
-int isPlaylist(const char *utf8file)
-{
- if (isFile(utf8file, NULL)) {
- return hasSuffix(utf8file, PLAYLIST_FILE_SUFFIX);
- }
- return 0;
-}
-
int isDir(const char *utf8name)
{
struct stat st;