diff options
author | Jochen Keil <jochen.keil@gmail.com> | 2009-03-11 09:57:32 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-03-14 09:33:55 +0100 |
commit | f31c371fbd95d1999b18c6b35596d8f3b71b620c (patch) | |
tree | 86a9107a5a927072c1330c06b457406da98692b6 /src/update.c | |
parent | 0aee49bdf839e8294f1982e981fff7e9dde97b91 (diff) | |
download | mpd-f31c371fbd95d1999b18c6b35596d8f3b71b620c.tar.gz mpd-f31c371fbd95d1999b18c6b35596d8f3b71b620c.tar.xz mpd-f31c371fbd95d1999b18c6b35596d8f3b71b620c.zip |
Removed superfluous if statement in update.c:453
Check for NULL not necessary here
Diffstat (limited to '')
-rw-r--r-- | src/update.c | 50 |
1 files changed, 22 insertions, 28 deletions
diff --git a/src/update.c b/src/update.c index 0abda07a0..1088f5338 100644 --- a/src/update.c +++ b/src/update.c @@ -450,42 +450,36 @@ update_container_file( struct directory* directory, return true; } - // contdir doesn't yet exist - if (contdir == NULL) - { - contdir = make_subdir(directory, name); - contdir->mtime = st->st_mtime; - contdir->device = DEVICE_CONTAINER; + contdir = make_subdir(directory, name); + contdir->mtime = st->st_mtime; + contdir->device = DEVICE_CONTAINER; - while ((vtrack = plugin->container_scan(pathname, ++tnum)) != NULL) - { - struct song* song = song_file_new(vtrack, contdir); - if (song == NULL) - return true; + while ((vtrack = plugin->container_scan(pathname, ++tnum)) != NULL) + { + struct song* song = song_file_new(vtrack, contdir); + if (song == NULL) + return true; - // shouldn't be necessary but it's there.. - song->mtime = st->st_mtime; + // shouldn't be necessary but it's there.. + song->mtime = st->st_mtime; - song->tag = plugin->tag_dup(map_directory_child_fs(contdir, vtrack)); + song->tag = plugin->tag_dup(map_directory_child_fs(contdir, vtrack)); - songvec_add(&contdir->songs, song); - song = NULL; + songvec_add(&contdir->songs, song); + song = NULL; - modified = true; + modified = true; - g_free(vtrack); - } + g_free(vtrack); + } - if (tnum == 1) - { - delete_directory(contdir); - return false; - } - else - return true; + if (tnum == 1) + { + delete_directory(contdir); + return false; } - // something went wrong, so return true to return update_regular_file - return true; + else + return true; } static void |