summaryrefslogtreecommitdiff
path: root/loader.c
diff options
context:
space:
mode:
authorFrank Neumann <fnu@yavdr.org>2017-06-01 21:15:48 +0200
committerFrank Neumann <fnu@yavdr.org>2017-06-01 21:15:48 +0200
commit279deb58064c2810a845af5c5fa306c4787e4767 (patch)
tree884c39a21bac62c21dc3a5d94b4bfaf6e9933d59 /loader.c
parent79022b11e7ba817550dee1a6e59a8d06e6a1d2a9 (diff)
downloadvdr-plugin-text2skin-279deb58064c2810a845af5c5fa306c4787e4767.tar.gz
vdr-plugin-text2skin-279deb58064c2810a845af5c5fa306c4787e4767.tar.bz2
try fix deprecated readdir_r.
Diffstat (limited to 'loader.c')
-rw-r--r--loader.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/loader.c b/loader.c
index 7a02e4b..73f970b 100644
--- a/loader.c
+++ b/loader.c
@@ -12,11 +12,11 @@
#include <dirent.h>
void cText2SkinLoader::Start(void) {
- DIR *d = opendir(SkinPath().c_str());
+ DIR *d;
+ struct dirent *result;
+ d = opendir(SkinPath().c_str());
if (d) {
- struct dirent ent;
- struct dirent *result;
- while ((readdir_r(d, &ent, &result)) == 0 && result != NULL) {
+ while ((result = readdir(p)) != NULL) {
struct stat buf;
if (strcmp(result->d_name, ".") == 0 || strcmp(result->d_name, "..") == 0)
continue;