display: change readdir_r to readdir 88/110888/1
authorJinhyung Choi <jinh0.choi@samsung.com>
Wed, 18 Jan 2017 11:17:20 +0000 (20:17 +0900)
committerJinhyung Choi <jinh0.choi@samsung.com>
Wed, 18 Jan 2017 11:17:20 +0000 (20:17 +0900)
Change-Id: Ic13966485605a76019b274cc06ec654f9af8d8b6
Signed-off-by: Jinhyung Choi <jinh0.choi@samsung.com>
src/device_manager_plugin_emul.c

index 137cd39..62acfc3 100644 (file)
@@ -246,7 +246,6 @@ int OEM_sys_get_backlight_brightness_by_lux(int lux, int *value)
 static int OEM_sys_display_info(struct display_info *disp_info)
 {
        struct dirent *dent;
-       struct dirent entry;
        DIR *dirp;
        int i, index;
        const char * bl_path = BACKLIGHT_PATH;
@@ -256,7 +255,7 @@ static int OEM_sys_display_info(struct display_info *disp_info)
        index = 0;
        dirp = opendir(bl_path);
        if (dirp) {
-               while (!readdir_r(dirp, &entry, &dent) && dent) {
+               while ((dent = readdir(dirp)) != NULL) {
                        if (index >= DISP_MAX) {
                                devmgr_log("supports %d display node", DISP_MAX);
                                break;
@@ -279,7 +278,7 @@ static int OEM_sys_display_info(struct display_info *disp_info)
        index = 0;
        dirp = opendir(lcd_path);
        if (dirp) {
-               while (!readdir_r(dirp, &entry, &dent) && dent) {
+               while ((dent = readdir(dirp)) != NULL) {
                        if (index >= DISP_MAX) {
                                devmgr_log("supports %d display node", DISP_MAX);
                                break;