mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
readdir_r use in tagcache.check_dir, ft_load
Change-Id: Ibcde39ed247e100dd47ae877fb2a3625bbb38d8b
This commit is contained in:
parent
f2f5543856
commit
0c737d3b2e
7 changed files with 129 additions and 24 deletions
|
@ -4863,8 +4863,8 @@ static int free_search_roots(struct search_roots_ll * start)
|
|||
|
||||
static bool check_dir(const char *dirname, int add_files)
|
||||
{
|
||||
static struct dirent direntry; /* function is recursive, static uses less stack */
|
||||
int success = false;
|
||||
|
||||
DIR *dir = opendir(dirname);
|
||||
if (!dir)
|
||||
{
|
||||
|
@ -4883,7 +4883,9 @@ static bool check_dir(const char *dirname, int add_files)
|
|||
/* Recursively scan the dir. */
|
||||
while (!check_event_queue())
|
||||
{
|
||||
struct dirent *entry = readdir(dir);
|
||||
struct dirent *entry;
|
||||
readdir_r(dir, &direntry, &entry);
|
||||
|
||||
if (entry == NULL)
|
||||
{
|
||||
success = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue