summaryrefslogtreecommitdiff
path: root/loader.c
diff options
context:
space:
mode:
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;