Commit f31c371f authored by Jochen Keil's avatar Jochen Keil Committed by Max Kellermann

Removed superfluous if statement in update.c:453

Check for NULL not necessary here
parent 0aee49bd
...@@ -450,42 +450,36 @@ update_container_file( struct directory* directory, ...@@ -450,42 +450,36 @@ update_container_file( struct directory* directory,
return true; return true;
} }
// contdir doesn't yet exist contdir = make_subdir(directory, name);
if (contdir == NULL) 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) while ((vtrack = plugin->container_scan(pathname, ++tnum)) != NULL)
{ {
struct song* song = song_file_new(vtrack, contdir); struct song* song = song_file_new(vtrack, contdir);
if (song == NULL) if (song == NULL)
return true; return true;
// shouldn't be necessary but it's there.. // shouldn't be necessary but it's there..
song->mtime = st->st_mtime; 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); songvec_add(&contdir->songs, song);
song = NULL; song = NULL;
modified = true; modified = true;
g_free(vtrack); g_free(vtrack);
} }
if (tnum == 1) if (tnum == 1)
{ {
delete_directory(contdir); delete_directory(contdir);
return false; return false;
}
else
return true;
} }
// something went wrong, so return true to return update_regular_file else
return true; return true;
} }
static void static void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment