summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorseungha.son <seungha.son@samsung.com>2016-11-28 19:14:13 +0900
committerseungha.son <seungha.son@samsung.com>2016-11-28 19:17:12 +0900
commitcd36234f45b2fba0d44a7bd626d1e0bbd6d9d4bb (patch)
tree3d9877bcadbc3e924b21eacff7e14c623bf11b7d
parentfb93e2b88ac44055ab8f55364e63a6ebc8f5fea8 (diff)
downloadnotification-cd36234f45b2fba0d44a7bd626d1e0bbd6d9d4bb.tar.gz
notification-cd36234f45b2fba0d44a7bd626d1e0bbd6d9d4bb.tar.bz2
notification-cd36234f45b2fba0d44a7bd626d1e0bbd6d9d4bb.zip
Adjust coding rule
Signed-off-by: seungha.son <seungha.son@samsung.com> Change-Id: If6dc6aa686e0d3c6bf81490c9924ef5f4ea12d8c
-rw-r--r--src/notification_setting_service.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/notification_setting_service.c b/src/notification_setting_service.c
index ebd6347..9c596ee 100644
--- a/src/notification_setting_service.c
+++ b/src/notification_setting_service.c
@@ -34,7 +34,7 @@
static int _get_table_field_data_int(char **table, int *buf, int index)
{
- if ((table == NULL) || (buf == NULL) || (index < 0)) {
+ if (table == NULL || buf == NULL || index < 0) {
/* LCOV_EXCL_START */
NOTIFICATION_ERR("table[%p], buf[%p], index[%d]", table, buf, index);
return false;
@@ -55,22 +55,24 @@ static int _get_table_field_data_int(char **table, int *buf, int index)
static int _get_table_field_data_string(char **table, char **buf, int ucs2, int index)
{
int ret = false;
+ int sLen = 0;
+ char *pTemp;
- if ((table == NULL) || (buf == NULL) || (index < 0)) {
+ if (table == NULL || buf == NULL || index < 0) {
/* LCOV_EXCL_START */
NOTIFICATION_ERR("table[%p], buf[%p], index[%d]", table, buf, index);
return false;
/* LCOV_EXCL_STOP */
}
- char *pTemp = table[index];
- int sLen = 0;
+ pTemp = table[index];
+
if (pTemp == NULL) {
*buf = NULL; /* LCOV_EXCL_LINE */
} else {
sLen = strlen(pTemp);
if (sLen) {
- *buf = (char *) malloc(sLen + 1);
+ *buf = (char *)malloc(sLen + 1);
if (*buf == NULL) {
NOTIFICATION_ERR("malloc is failed"); /* LCOV_EXCL_LINE */
goto out;