playlist_read_file - prevent implicit slow memsets

This commit is contained in:
twinaphex 2016-10-09 09:07:53 +02:00
parent d078df7a37
commit 8578e19903
1 changed files with 5 additions and 1 deletions

View File

@ -438,10 +438,14 @@ size_t playlist_size(playlist_t *playlist)
static bool playlist_read_file(
playlist_t *playlist, const char *path)
{
char buf[PLAYLIST_ENTRIES][1024] = {{0}};
unsigned i;
char buf[PLAYLIST_ENTRIES][1024];
RFILE *file = filestream_open(
path, RFILE_MODE_READ_TEXT, -1);
for (i = 0; i < PLAYLIST_ENTRIES; i++)
buf[i][0] = '\0';
/* If playlist file does not exist,
* create an empty playlist instead.
*/