sensor: hal: tm2: fix coding rule violations 28/149228/1 accepted/tizen_5.0_unified tizen_5.0 accepted/tizen/5.0/unified/20181102.012812 accepted/tizen/unified/20170913.071913 submit/tizen/20170912.122717 submit/tizen_5.0/20181101.000001
authorkibak.yoon <kibak.yoon@samsung.com>
Tue, 12 Sep 2017 02:16:20 +0000 (11:16 +0900)
committerkibak.yoon <kibak.yoon@samsung.com>
Tue, 12 Sep 2017 02:16:20 +0000 (11:16 +0900)
Change-Id: Ifaa8baa771092c30cb54c61c3d1d844b1ae25659
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
12 files changed:
src/accel/accel_device.cpp
src/accel/accel_device.h
src/gyro/gyro_device.cpp
src/gyro/gyro_device.h
src/light/light_device.cpp
src/light/light_device.h
src/pressure/pressure_device.cpp
src/pressure/pressure_device.h
src/sensor_log.h
src/ultraviolet/uv_device.cpp
src/ultraviolet/uv_device.h
src/util.cpp

index d47909e765f495dd1765121aed13c5ad2f3434fc..c25a5e540116a758ee907417fd8ae28ae6bde582 100644 (file)
@@ -184,8 +184,8 @@ bool accel_device::set_interval(uint32_t id, unsigned long val)
 
 bool accel_device::update_value_input_event(void)
 {
-       int accel_raw[3] = {0,};
-       bool x,y,z;
+       int accel_raw[3] = {0, };
+       bool x, y, z;
        int read_input_cnt = 0;
        const int INPUT_MAX_BEFORE_SYN = 10;
        unsigned long long fired_time = 0;
@@ -199,7 +199,7 @@ bool accel_device::update_value_input_event(void)
        while ((syn == false) && (read_input_cnt < INPUT_MAX_BEFORE_SYN)) {
                int len = read(m_node_handle, &accel_input, sizeof(accel_input));
                if (len != sizeof(accel_input)) {
-                       _E("accel_file read fail, read_len = %d",len);
+                       _E("accel_file read fail, read_len = %d", len);
                        return false;
                }
 
index 36c958d2a625e2bc9d1b4eb5df52e71f361606cb..6c4b02b2e492095555961736856b98782c4b5e1d 100644 (file)
@@ -53,7 +53,7 @@ private:
        std::string m_enable_node;
        std::string m_interval_node;
 
-       std::function<bool (void)> update_value;
+       std::function<bool(void)> update_value;
 
        std::vector<uint32_t> event_ids;
 
index e84d7bd11d792137af50993c1d4d2b9b01fab3cc..dfeff569d9c5d2c8f7b9c0423e455c1241871331 100644 (file)
@@ -181,8 +181,8 @@ bool gyro_device::set_interval(uint32_t id, unsigned long val)
 
 bool gyro_device::update_value_input_event(void)
 {
-       int gyro_raw[3] = {0,};
-       bool x,y,z;
+       int gyro_raw[3] = {0, };
+       bool x, y, z;
        int read_input_cnt = 0;
        const int INPUT_MAX_BEFORE_SYN = 10;
        unsigned long long fired_time = 0;
index f2abfb04dad9aa385974782c4cd32d28d14ba34d..994c1b2ed949cf137fc9b6ca21b561e2d1e716ab 100644 (file)
@@ -52,7 +52,7 @@ private:
        std::string m_enable_node;
        std::string m_interval_node;
 
-       std::function<bool (void)> update_value;
+       std::function<bool(void)> update_value;
 
        std::vector<uint32_t> event_ids;
 
index d75e8baf87bf9c1c242c2582834eb3d22fe7a9ec..ebcc681a821c2746148fcd8cfc8f0f4e380c6d2a 100644 (file)
@@ -58,7 +58,7 @@
 #define MAX_LUX_VALUE     150000
 #define MAX_ALS_VALUE     0xFFFF
 #define GAB (0.15)
-#define min_t(a,b) (((a) < (b)) ? (a) : (b))
+#define min_t(a, b) (((a) < (b)) ? (a) : (b))
 
 static sensor_info_t sensor_info = {
        id: 0x1,
@@ -195,7 +195,7 @@ bool light_device::update_value_lux(void)
        while ((syn == false) && (read_input_cnt < INPUT_MAX_BEFORE_SYN)) {
                int len = read(m_node_handle, &light_event, sizeof(light_event));
                if (len != sizeof(light_event)) {
-                       _E("light_file read fail, read_len = %d\n",len);
+                       _E("light_file read fail, read_len = %d\n", len);
                        return false;
                }
 
index bac76480f1b0477dc2ee531b8a29de8cd8598054..3f87ad4ba74eddb223c0ee45f79bb5d6b83ec102 100644 (file)
@@ -52,7 +52,7 @@ private:
        std::string m_data_node;
        std::string m_interval_node;
 
-       std::function<bool (void)> update_value;
+       std::function<bool(void)> update_value;
 
        std::vector<uint32_t> event_ids;
 
index 529dec6085c09527db009703c8c3f9bd0752b346..78bd93061ecf91ade0e219a80ab45e481947f263 100644 (file)
@@ -184,7 +184,7 @@ bool pressure_device::set_interval(uint32_t id, unsigned long val)
 
 bool pressure_device::update_value_input_event(void)
 {
-       int pressure_raw[3] = {0,};
+       int pressure_raw[3] = {0, };
        bool pressure = false;
        bool sea_level = false;
        bool temperature = false;
@@ -199,7 +199,7 @@ bool pressure_device::update_value_input_event(void)
        while ((syn == false) && (read_input_cnt < INPUT_MAX_BEFORE_SYN)) {
                int len = read(m_node_handle, &pressure_event, sizeof(pressure_event));
                if (len != sizeof(pressure_event)) {
-                       _E("pressure_file read fail, read_len = %d\n",len);
+                       _E("pressure_file read fail, read_len = %d\n", len);
                        return false;
                }
 
index b377b1a67c837ae7b0a487a085d8ab628a8adb76..c46b3204d8feb7c01fd0597fbd731aedc4856601 100644 (file)
@@ -53,7 +53,7 @@ private:
        std::string m_enable_node;
        std::string m_interval_node;
 
-       std::function<bool (void)> update_value;
+       std::function<bool(void)> update_value;
 
        std::vector<uint32_t> event_ids;
 
index 8e593e2b228def850554c435d6a4846871d77cd7..ac9e8c255899122b98e17dcab6f911969331e0c7 100644 (file)
 #endif
 #define LOG_TAG        "SENSOR"
 
-#define LOG_DUMP(fp, fmt, arg...) do { if (fp) fprintf(fp, fmt, ##arg); else _E(fmt, ##arg); } while(0)
+#define LOG_DUMP(fp, fmt, arg...) do { if (fp) fprintf(fp, fmt, ##arg); else _E(fmt, ##arg); } while (0)
 
 #ifdef _DEBUG
 #define DBG SLOGD
 #else
-#define DBG(...) do{} while(0)
+#define DBG(...) do { } while (0)
 #endif
 
 #define ERR SLOGE
index 341ebe77355dc3522e7c5008f6856ec90914e199..b5ad725815cb1341d27c0c42a9c2779f8c6c5b68 100644 (file)
@@ -181,7 +181,7 @@ bool uv_device::update_value_input_event(void)
        while ((syn == false) && (read_input_cnt < INPUT_MAX_BEFORE_SYN)) {
                int len = read(m_node_handle, &ultraviolet_event, sizeof(ultraviolet_event));
                if (len != sizeof(ultraviolet_event)) {
-                       _E("ultraviolet file read fail, read_len = %d\n",len);
+                       _E("ultraviolet file read fail, read_len = %d\n", len);
                        return false;
                }
 
index 34b536eceb3e5f365d6735f488912e1d7f81a73a..799f3f1c7625522af5863c27b2f3c87542a11e6e 100644 (file)
@@ -52,7 +52,7 @@ private:
        std::string m_enable_node;
        std::string m_interval_node;
 
-       std::function<bool (void)> update_value;
+       std::function<bool(void)> update_value;
 
        std::vector<uint32_t> event_ids;
 
index e725c3a94f9b52e2d9145eadd361e3ac530b3d65..a75ff25380f52821636dd76b87b8c2b9eef6b5f7 100644 (file)
@@ -153,7 +153,6 @@ static bool get_input_method(const string &key, int &method, string &device_num)
        bool find = false;
 
        for (int i = 0; i < input_info_len; ++i) {
-
                prefix_size = input_info[i].prefix.size();
 
                dir = opendir(input_info[i].dir_path.c_str());