aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-09 19:16:21 +0200
committerEric Wong <normalperson@yhbt.net>2008-10-11 19:21:51 -0700
commit7945d695e5ebcfea8e41e0c3b2dc5b72f8b0a0b9 (patch)
tree8b840289f70575fb6d918c1034f46f085bfc8fd3
parent01bf8687f27db7d4ddec019a606670d43ec14680 (diff)
downloadmpd-7945d695e5ebcfea8e41e0c3b2dc5b72f8b0a0b9.tar.gz
mpd-7945d695e5ebcfea8e41e0c3b2dc5b72f8b0a0b9.tar.xz
mpd-7945d695e5ebcfea8e41e0c3b2dc5b72f8b0a0b9.zip
update: make the "song" variable more local
-rw-r--r--src/update.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/update.c b/src/update.c
index 5b2721cdb..a1e33ba22 100644
--- a/src/update.c
+++ b/src/update.c
@@ -239,10 +239,9 @@ static enum update_return
updateInDirectory(struct directory *directory,
const char *name, const struct stat *st)
{
- struct mpd_song *song;
-
if (S_ISREG(st->st_mode) && hasMusicSuffix(name, 0)) {
const char *shortname = mpd_basename(name);
+ struct mpd_song *song;
if (!(song = songvec_find(&directory->songs, shortname))) {
if (!(song = song_file_load(shortname, directory)))