summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkibak.yoon <kibak.yoon@samsung.com>2017-09-12 11:26:28 +0900
committerkibak.yoon <kibak.yoon@samsung.com>2017-09-12 11:26:28 +0900
commitad040979c4addb3598cf6835879aafee0f623d04 (patch)
tree6fd779ac4037d22451d8b12e54df00d4beace6cf
parenteb588be7d69906c520eb5916ee53539eb73f8837 (diff)
downloadsensor-hal-tw2-ad040979c4addb3598cf6835879aafee0f623d04.tar.gz
sensor-hal-tw2-ad040979c4addb3598cf6835879aafee0f623d04.tar.bz2
sensor-hal-tw2-ad040979c4addb3598cf6835879aafee0f623d04.zip
sensor: hal: tw2: fix coding rule violationssubmit/tizen/20170912.122717accepted/tizen/unified/20170913.071919
Change-Id: I6695b7d74efb6761d1208a649d8cd79640a4fa2f Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
-rw-r--r--src/gyro/gyro_device.cpp2
-rw-r--r--src/hrm/hrm_device.cpp2
-rw-r--r--src/pressure/pressure_device.cpp4
-rw-r--r--src/sensor_log.h4
-rw-r--r--src/util.cpp1
5 files changed, 6 insertions, 7 deletions
diff --git a/src/gyro/gyro_device.cpp b/src/gyro/gyro_device.cpp
index 70ed0e3..c5ee459 100644
--- a/src/gyro/gyro_device.cpp
+++ b/src/gyro/gyro_device.cpp
@@ -158,7 +158,7 @@ bool gyro_device::set_interval(uint32_t id, unsigned long val)
bool gyro_device::update_value_input_event(void)
{
- int gyro_raw[3] = {0,};
+ int gyro_raw[3] = {0, };
bool x, y, z;
int read_input_cnt = 0;
const int INPUT_MAX_BEFORE_SYN = 10;
diff --git a/src/hrm/hrm_device.cpp b/src/hrm/hrm_device.cpp
index 9f3d9d4..d00c1ad 100644
--- a/src/hrm/hrm_device.cpp
+++ b/src/hrm/hrm_device.cpp
@@ -166,7 +166,7 @@ bool hrm_device::update_value_input_event(void)
{
const float SNR_SIG_FIGS = 10000.0f;
const int HR_MAX = 300;
- int hrm_raw[4] = {0,};
+ int hrm_raw[4] = {0, };
unsigned long long fired_time = 0;
int read_input_cnt = 0;
const int INPUT_MAX_BEFORE_SYN = 10;
diff --git a/src/pressure/pressure_device.cpp b/src/pressure/pressure_device.cpp
index 7153f99..c98c084 100644
--- a/src/pressure/pressure_device.cpp
+++ b/src/pressure/pressure_device.cpp
@@ -162,7 +162,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;
@@ -177,7 +177,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;
}
diff --git a/src/sensor_log.h b/src/sensor_log.h
index 496786e..8ac5abb 100644
--- a/src/sensor_log.h
+++ b/src/sensor_log.h
@@ -29,12 +29,12 @@
#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
diff --git a/src/util.cpp b/src/util.cpp
index 07532b8..1692d44 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -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());