plugin: change readdir_r to readdir 87/110887/1
authorJinhyung Choi <jinh0.choi@samsung.com>
Wed, 18 Jan 2017 11:11:36 +0000 (20:11 +0900)
committerJinhyung Choi <jinh0.choi@samsung.com>
Wed, 18 Jan 2017 11:11:36 +0000 (20:11 +0900)
Change-Id: I52dd35a4b458a8bab692833978a4479fa7c5b196
Signed-off-by: Jinhyung Choi <jinh0.choi@samsung.com>
src/emuld.cpp

index f2db62f726d002e5b7229190acf4df2684a40532..9eb4e4dc637dc61bd640f0fcf6c5083608209099 100644 (file)
@@ -62,7 +62,6 @@ static void init_plugins(void)
 {
     DIR *dirp = NULL;
     struct dirent *dir_ent = NULL;
-    struct dirent entry;
     char plugin_path[MAX_PATH] = {0, };
     void* handle = NULL;
     bool (*plugin_init)() = NULL;
@@ -76,7 +75,7 @@ static void init_plugins(void)
         return;
     }
 
-    while ((!readdir_r(dirp, &entry, &dir_ent)) && dir_ent)
+    while ((dir_ent = readdir(dirp)) != NULL)
     {
         snprintf(plugin_path, sizeof(plugin_path), "%s/%s", EMULD_PLUGIN_DIR, dir_ent->d_name);