diff options
author | ChulHo Song <ch81.song@samsung.com> | 2016-03-18 14:53:13 +0900 |
---|---|---|
committer | ChulHo Song <ch81.song@samsung.com> | 2016-03-18 14:53:13 +0900 |
commit | 36a24aa7ec2c13b3b2a37668090b8c869ffcd6c7 (patch) | |
tree | 7c770610be8fb6783a8fcc65e5c4f74ed7f11008 | |
parent | 4cd4bbcbbd9e83e2603c6e14e9b8fc12df59b341 (diff) | |
download | device-manager-plugin-emul-36a24aa7ec2c13b3b2a37668090b8c869ffcd6c7.tar.gz device-manager-plugin-emul-36a24aa7ec2c13b3b2a37668090b8c869ffcd6c7.tar.bz2 device-manager-plugin-emul-36a24aa7ec2c13b3b2a37668090b8c869ffcd6c7.zip |
source: readdir -> readdir_r
Change-Id: I68684b6453d7f67f13b4b4deb427546be933b5d3
Signed-off-by: ChulHo Song <ch81.song@samsung.com>
-rw-r--r-- | src/device_manager_plugin_emul.c | 5 | ||||
-rw-r--r-- | src/device_manager_plugin_maru.c | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/device_manager_plugin_emul.c b/src/device_manager_plugin_emul.c index 3bf91fa..85f4500 100644 --- a/src/device_manager_plugin_emul.c +++ b/src/device_manager_plugin_emul.c @@ -246,6 +246,7 @@ 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; @@ -255,7 +256,7 @@ static int OEM_sys_display_info(struct display_info *disp_info) index = 0; dirp = opendir(bl_path); if (dirp) { - while((dent = readdir(dirp))) { + while (!readdir_r(dirp, &entry, &dent)) { if (index >= DISP_MAX) { devmgr_log("supports %d display node", DISP_MAX); break; @@ -278,7 +279,7 @@ static int OEM_sys_display_info(struct display_info *disp_info) index = 0; dirp = opendir(lcd_path); if (dirp) { - while((dent = readdir(dirp))) { + while (!readdir_r(dirp, &entry, &dent)) { if (index >= DISP_MAX) { devmgr_log("supports %d display node", DISP_MAX); break; diff --git a/src/device_manager_plugin_maru.c b/src/device_manager_plugin_maru.c index e75964a..5844dc3 100644 --- a/src/device_manager_plugin_maru.c +++ b/src/device_manager_plugin_maru.c @@ -184,6 +184,7 @@ int OEM_sys_get_backlight_brightness_by_lux(unsigned int lux, enum lux_status st 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; @@ -193,7 +194,7 @@ static int OEM_sys_display_info(struct display_info *disp_info) index = 0; dirp = opendir(bl_path); if (dirp) { - while(dent = readdir(dirp)) { + while (!readdir_r(dirp, &entry, &dent)) { if (index >= DISP_MAX) { devmgr_log("supports %d display node", DISP_MAX); break; @@ -216,7 +217,7 @@ static int OEM_sys_display_info(struct display_info *disp_info) index = 0; dirp = opendir(lcd_path); if (dirp) { - while(dent = readdir(dirp)) { + while (!readdir_r(dirp, &entry, &dent)) { if (index >= DISP_MAX) { devmgr_log("supports %d display node", DISP_MAX); break; |