diff options
author | Max Kellermann <max@duempel.org> | 2008-10-13 16:56:00 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-13 16:56:00 +0200 |
commit | f71ac4d479502738682f2328a6523d18be705ac9 (patch) | |
tree | 74d37b138efcd8293f03acee582aec6a819dd457 /src/ls.c | |
parent | 94a5a5a985ab0ce3d8ca72d4e5be28a71a1010e0 (diff) | |
download | mpd-f71ac4d479502738682f2328a6523d18be705ac9.tar.gz mpd-f71ac4d479502738682f2328a6523d18be705ac9.tar.xz mpd-f71ac4d479502738682f2328a6523d18be705ac9.zip |
song: stat file in song_file_update(), don't use isMusic()
isMusic() used to be a very inefficient function: with every
invocation, it did another stat() on the specified file. There is
only one caller, do the stat() there manually and use hasMusicSuffix()
instead of isMusic().
Diffstat (limited to 'src/ls.c')
-rw-r--r-- | src/ls.c | 12 |
1 files changed, 0 insertions, 12 deletions
@@ -255,15 +255,3 @@ struct decoder_plugin *hasMusicSuffix(const char *utf8file, unsigned int next) return ret; } - -struct decoder_plugin *isMusic(const char *utf8file, time_t * mtime, - unsigned int next) -{ - if (isFile(utf8file, mtime)) { - struct decoder_plugin *plugin = hasMusicSuffix(utf8file, next); - if (plugin != NULL) - return plugin; - } - DEBUG("isMusic: %s is not a valid file\n", utf8file); - return NULL; -} |