Remove unused code path from playlist_create_ex().
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30030 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
316f9a0238
commit
1a86aab1a2
1 changed files with 14 additions and 21 deletions
|
@ -2676,8 +2676,10 @@ void playlist_set_last_shuffled_start(void)
|
||||||
/*
|
/*
|
||||||
* Create a new playlist If playlist is not NULL then we're loading a
|
* Create a new playlist If playlist is not NULL then we're loading a
|
||||||
* playlist off disk for viewing/editing. The index_buffer is used to store
|
* playlist off disk for viewing/editing. The index_buffer is used to store
|
||||||
* playlist indices (required for and only used if !current playlist). The
|
* playlist indices (required for and only used if playlist != NULL). The
|
||||||
* temp_buffer (if not NULL) is used as a scratchpad when loading indices.
|
* temp_buffer is used as a scratchpad when loading indices.
|
||||||
|
*
|
||||||
|
* returns <0 on failure
|
||||||
*/
|
*/
|
||||||
int playlist_create_ex(struct playlist_info* playlist,
|
int playlist_create_ex(struct playlist_info* playlist,
|
||||||
const char* dir, const char* file,
|
const char* dir, const char* file,
|
||||||
|
@ -2688,6 +2690,8 @@ int playlist_create_ex(struct playlist_info* playlist,
|
||||||
playlist = ¤t_playlist;
|
playlist = ¤t_playlist;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (!index_buffer)
|
||||||
|
return -1;
|
||||||
/* Initialize playlist structure */
|
/* Initialize playlist structure */
|
||||||
int r = rand() % 10;
|
int r = rand() % 10;
|
||||||
playlist->current = false;
|
playlist->current = false;
|
||||||
|
@ -2698,8 +2702,6 @@ int playlist_create_ex(struct playlist_info* playlist,
|
||||||
playlist->fd = -1;
|
playlist->fd = -1;
|
||||||
playlist->control_fd = -1;
|
playlist->control_fd = -1;
|
||||||
|
|
||||||
if (index_buffer)
|
|
||||||
{
|
|
||||||
int num_indices = index_buffer_size / sizeof(int);
|
int num_indices = index_buffer_size / sizeof(int);
|
||||||
|
|
||||||
#ifdef HAVE_DIRCACHE
|
#ifdef HAVE_DIRCACHE
|
||||||
|
@ -2714,15 +2716,6 @@ int playlist_create_ex(struct playlist_info* playlist,
|
||||||
playlist->filenames = (const struct dircache_entry **)
|
playlist->filenames = (const struct dircache_entry **)
|
||||||
&playlist->indices[num_indices];
|
&playlist->indices[num_indices];
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
playlist->max_playlist_size = current_playlist.max_playlist_size;
|
|
||||||
playlist->indices = current_playlist.indices;
|
|
||||||
#ifdef HAVE_DIRCACHE
|
|
||||||
playlist->filenames = current_playlist.filenames;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
playlist->buffer_size = 0;
|
playlist->buffer_size = 0;
|
||||||
playlist->buffer = NULL;
|
playlist->buffer = NULL;
|
||||||
|
|
Loading…
Reference in a new issue