From 6a64accc185cf655b20b6d5b5055133c997f25bb Mon Sep 17 00:00:00 2001 From: "kibak.yoon" Date: Wed, 1 Jun 2016 00:13:28 +0900 Subject: [PATCH] sensord: rename return variables from err to ret - change the condition about state is not equal to PSMODE_NORMAL Change-Id: I7d8de4b7434a5c857760ae81789b8805f9c38607 Signed-off-by: kibak.yoon --- src/client/client.cpp | 10 +++++----- src/server/sensor_loader.cpp | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/client/client.cpp b/src/client/client.cpp index e77b1b3..861aa43 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -119,18 +119,18 @@ void clean_up(void) static int get_power_save_state(void) { - int err; + int ret; int state = 0; int pm_state, ps_state; - err = vconf_get_int(VCONFKEY_PM_STATE, &pm_state); + ret = vconf_get_int(VCONFKEY_PM_STATE, &pm_state); - if (!err && pm_state == VCONFKEY_PM_STATE_LCDOFF) + if (!ret && pm_state == VCONFKEY_PM_STATE_LCDOFF) state |= SENSOR_OPTION_ON_IN_SCREEN_OFF; - err = vconf_get_int(VCONFKEY_SETAPPL_PSMODE, &ps_state); + ret = vconf_get_int(VCONFKEY_SETAPPL_PSMODE, &ps_state); - if (!err && ps_state == SETTING_PSMODE_NORMAL) + if (!ret && ps_state != SETTING_PSMODE_NORMAL) state |= SENSOR_OPTION_ON_IN_POWERSAVE_MODE; return state; diff --git a/src/server/sensor_loader.cpp b/src/server/sensor_loader.cpp index a873d71..0d12915 100644 --- a/src/server/sensor_loader.cpp +++ b/src/server/sensor_loader.cpp @@ -326,7 +326,7 @@ bool sensor_loader::get_paths_from_dir(const string &dir_path, vector &h struct dirent dir_entry; struct dirent *result; string name; - int error; + int ret; dir = opendir(dir_path.c_str()); @@ -336,9 +336,9 @@ bool sensor_loader::get_paths_from_dir(const string &dir_path, vector &h } while (true) { - error = readdir_r(dir, &dir_entry, &result); + ret = readdir_r(dir, &dir_entry, &result); - if (error != 0) + if (ret != 0) continue; if (result == NULL) -- 2.7.4