sensord: rename return variables from err to ret 08/72508/1
authorkibak.yoon <kibak.yoon@samsung.com>
Tue, 31 May 2016 15:13:28 +0000 (00:13 +0900)
committerkibak.yoon <kibak.yoon@samsung.com>
Wed, 1 Jun 2016 09:20:38 +0000 (18:20 +0900)
- change the condition about state is not equal to PSMODE_NORMAL

Change-Id: I7d8de4b7434a5c857760ae81789b8805f9c38607
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
src/client/client.cpp
src/server/sensor_loader.cpp

index e77b1b3..861aa43 100644 (file)
@@ -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;
index a873d71..0d12915 100644 (file)
@@ -326,7 +326,7 @@ bool sensor_loader::get_paths_from_dir(const string &dir_path, vector<string> &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<string> &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)