summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJinhyung Choi <jinh0.choi@samsung.com>2017-01-18 20:17:20 +0900
committerJinhyung Choi <jinh0.choi@samsung.com>2017-01-18 20:17:20 +0900
commita7aa55e96f70bddc5016281ddf0d0a8eb90644a8 (patch)
treefc645c670d3d53078a814a54281250582d1f43dc
parent82418334f4b683de099b19afd43d25cc20a62386 (diff)
downloaddevice-manager-plugin-emul-a7aa55e96f70bddc5016281ddf0d0a8eb90644a8.tar.gz
device-manager-plugin-emul-a7aa55e96f70bddc5016281ddf0d0a8eb90644a8.tar.bz2
device-manager-plugin-emul-a7aa55e96f70bddc5016281ddf0d0a8eb90644a8.zip
display: change readdir_r to readdir
Change-Id: Ic13966485605a76019b274cc06ec654f9af8d8b6 Signed-off-by: Jinhyung Choi <jinh0.choi@samsung.com>
-rw-r--r--src/device_manager_plugin_emul.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/device_manager_plugin_emul.c b/src/device_manager_plugin_emul.c
index 137cd39..62acfc3 100644
--- a/src/device_manager_plugin_emul.c
+++ b/src/device_manager_plugin_emul.c
@@ -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;