diff options
author | William Wilgus <me.theuser@yahoo.com> | 2024-05-02 13:38:32 -0400 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2024-05-02 13:38:32 -0400 |
commit | efcea6628024c5f6796c3850c3779801db4b6874 (patch) | |
tree | 6b0a5ce6ce0ddb46de5e412dae110d9ba99414d5 /apps/tagcache.c | |
parent | 0c737d3b2e4728347cf4d52025f9fc2ebbee6e90 (diff) | |
download | rockbox-efcea6628024c5f6796c3850c3779801db4b6874.tar.gz rockbox-efcea6628024c5f6796c3850c3779801db4b6874.zip |
Revert "readdir_r use in tagcache.check_dir, ft_load"
This reverts commit 0c737d3b2e4728347cf4d52025f9fc2ebbee6e90.
Reason for revert: Not really a concern as open_stream returns an independent buffer since g#566
Change-Id: Idbd2f4a7cc2ea6362b7714629469eeb7b3d19b3b
Diffstat (limited to 'apps/tagcache.c')
-rw-r--r-- | apps/tagcache.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/apps/tagcache.c b/apps/tagcache.c index 302b6ad9de..9463d7c865 100644 --- a/apps/tagcache.c +++ b/apps/tagcache.c | |||
@@ -4863,8 +4863,8 @@ static int free_search_roots(struct search_roots_ll * start) | |||
4863 | 4863 | ||
4864 | static bool check_dir(const char *dirname, int add_files) | 4864 | static bool check_dir(const char *dirname, int add_files) |
4865 | { | 4865 | { |
4866 | static struct dirent direntry; /* function is recursive, static uses less stack */ | ||
4867 | int success = false; | 4866 | int success = false; |
4867 | |||
4868 | DIR *dir = opendir(dirname); | 4868 | DIR *dir = opendir(dirname); |
4869 | if (!dir) | 4869 | if (!dir) |
4870 | { | 4870 | { |
@@ -4883,9 +4883,7 @@ static bool check_dir(const char *dirname, int add_files) | |||
4883 | /* Recursively scan the dir. */ | 4883 | /* Recursively scan the dir. */ |
4884 | while (!check_event_queue()) | 4884 | while (!check_event_queue()) |
4885 | { | 4885 | { |
4886 | struct dirent *entry; | 4886 | struct dirent *entry = readdir(dir); |
4887 | readdir_r(dir, &direntry, &entry); | ||
4888 | |||
4889 | if (entry == NULL) | 4887 | if (entry == NULL) |
4890 | { | 4888 | { |
4891 | success = true; | 4889 | success = true; |