Fix the coding style errors 46/102646/1 accepted/tizen_3.0.m2_mobile accepted/tizen_3.0.m2_wearable tizen_3.0.m2 accepted/tizen/3.0.m2/mobile/20170104.125458 accepted/tizen/3.0.m2/wearable/20170104.125919 accepted/tizen/3.0/common/20161207.195238 accepted/tizen/3.0/ivi/20161207.135114 accepted/tizen/3.0/mobile/20161207.134940 accepted/tizen/3.0/wearable/20161207.135027 submit/tizen_3.0.m2/20170104.093750 submit/tizen_3.0/20161207.043635
authorDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 6 Dec 2016 08:45:53 +0000 (17:45 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 6 Dec 2016 08:45:53 +0000 (17:45 +0900)
Change-Id: Id2bbe5699fafe9197fdebf8f359f4e871e638af5
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
ag-agent/bluetooth-ag-agent.c
ag-agent/bluetooth-ag-handler.c
ag-agent/bluetooth-ag-handler.h
ag-agent/bluetooth-ag-manager.c
hf-agent/bluetooth-hf-agent.c
map-agent/bluetooth_map_email.c
map-agent/bluetooth_map_sms.c
pb-agent/bluetooth_pb_agent.c
pb-agent/bluetooth_pb_vcard.c

index d3745df..6f4f8c4 100755 (executable)
@@ -426,9 +426,8 @@ void __bt_convert_device_path_to_address(const gchar *device_path,
                dev_addr += 4;
                g_strlcpy(address, dev_addr, sizeof(address));
 
-               while ((pos = strchr(address, '_')) != NULL) {
+               while ((pos = strchr(address, '_')) != NULL)
                        *pos = ':';
-               }
 
                g_strlcpy(device_address, address, BT_ADDRESS_STRING_SIZE);
        }
@@ -3767,27 +3766,25 @@ static void __bt_ag_agent_subscribe_vconf_updates(void)
 
        ret = vconf_notify_key_changed(VCONFKEY_SYSMAN_BATTERY_CAPACITY,
                                (void *)__bt_ag_agent_battery_status_cb, NULL);
-       if (0 != ret) {
+       if (0 != ret)
                ERR("Subsrciption to battery status failed err =  [%d]\n", ret);
-       }
 
        ret = vconf_notify_key_changed(VCONFKEY_TELEPHONY_RSSI,
                        (void *)__bt_ag_agent_network_signal_status_cb, NULL);
-       if (0 != ret) {
+       if (0 != ret)
                ERR("Subsrciption to netowrk signal failed err =  [%d]\n", ret);
-       }
 
        ret = vconf_notify_key_changed(VCONFKEY_TELEPHONY_SVCTYPE,
                        (void *)__bt_ag_agent_network_register_status_cb, NULL);
-       if (0 != ret) {
+       if (0 != ret)
                ERR("Subsrciption to network failed err =  [%d]\n", ret);
-       }
+
 #ifdef TIZEN_FEATURE_BT_LUNAR_DEVICE
        ret = vconf_notify_key_changed(VCONF_KEY_BT_LUNAR_ENABLED,
                        (void *)__bt_ag_agent_lunar_connection_status_cb, NULL);
-       if (0 != ret) {
+       if (0 != ret)
                ERR("Subsrciption to lunar connection failed err =  [%d]\n", ret);
-       }
+
 #endif
 }
 
@@ -3799,21 +3796,18 @@ static void __bt_ag_agent_release_vconf_updates(void)
 
        ret = vconf_ignore_key_changed(VCONFKEY_SYSMAN_BATTERY_CAPACITY,
                        (vconf_callback_fn)__bt_ag_agent_battery_status_cb);
-       if (0 != ret) {
+       if (0 != ret)
                ERR("vconf_ignore_key_changed failed\n");
-       }
 
        ret = vconf_ignore_key_changed(VCONFKEY_TELEPHONY_RSSI,
                (vconf_callback_fn)__bt_ag_agent_network_signal_status_cb);
-       if (0 != ret) {
+       if (0 != ret)
                ERR("vconf_ignore_key_changed failed\n");
-       }
 
        ret = vconf_ignore_key_changed(VCONFKEY_TELEPHONY_SVCTYPE,
                (vconf_callback_fn)__bt_ag_agent_network_register_status_cb);
-       if (0 != ret) {
+       if (0 != ret)
                ERR("vconf_ignore_key_changed failed\n");
-       }
 }
 
 static gboolean __bt_ag_agent_send_subscriber_number_changed(
@@ -4378,9 +4372,8 @@ int main(void)
                return EXIT_FAILURE;
        }
 
-       if (pthread_detach(thread_id) < 0) {
+       if (pthread_detach(thread_id) < 0)
                ERR("pthread_detach() is failed");
-       }
 
        g_main_loop_run(gmain_loop);
 
index cef808f..2a761d3 100644 (file)
@@ -1383,11 +1383,10 @@ int _bt_hfp_get_imsi(bt_ag_info_t *device, const char *buf)
        int len = strlen(buf);
        DBG_SECURE("Buf %s", buf);
 
-       if (len == 7) {
+       if (len == 7)
                _bt_hfp_get_imsi_req(device);
-       } else {
+       else
                _bt_ag_send_response(device, HFP_STATE_MNGR_ERR_INVALID_INDEX);
-       }
 
        return 0;
 }
@@ -1398,13 +1397,13 @@ int _bt_hfp_get_creg_status(bt_ag_info_t *device, const char *buf)
        DBG_SECURE("buf %s", buf);
        if (len < 7 || len > 9)
                return -EINVAL;
-       else if (len == 7) {
+       else if (len == 7)
                _bt_ag_send_response(device, HFP_STATE_MNGR_ERR_INVALID_INDEX);
-       } else if (buf[7] == '=') {
+       else if (buf[7] == '=')
                _bt_ag_send_response(device, HFP_STATE_MNGR_ERR_INVALID_INDEX);
-       } else if (buf[7] == '?') {
+       else if (buf[7] == '?')
                _bt_hfp_get_creg_status_req(device);
-       }
+
        return 0;
 }
 int _bt_hfp_get_revision_info_rsp(void *t_device, char *revision,
index ad030b4..96bd7f3 100755 (executable)
@@ -176,5 +176,4 @@ int _bt_hfp_get_revision_info_rsp(void *t_device,
 int _bt_hfp_vendor_cmd(bt_ag_info_t *hs, const char *buf);
 int _bt_hfp_send_vendor_cmd(bt_ag_info_t *hs,
                const char *cmd);
-int _bt_vendor_cmd_response(void *t_device,
-                       bt_hfp_agent_error_t err);
\ No newline at end of file
+int _bt_vendor_cmd_response(void *t_device, bt_hfp_agent_error_t err);
index 4e322cf..d909ea0 100755 (executable)
@@ -702,9 +702,8 @@ static void __bt_hfp_set_call_status(struct telephony_call *t_call,
                        __bt_hfp_modify_indicator("call",
                                        INDICATOR_EVENT_CALL_INACTIVE);
 
-               if (org_status == HFP_CALL_STATUS_HOLD) {
+               if (org_status == HFP_CALL_STATUS_HOLD)
                        __bt_hfp_modify_indicator("callheld", INDICATOR_EVENT_CALLHELD_NONE);
-               }
 
                if ((org_status == HFP_CALL_STATUS_MO_ALERTING) ||
                        (org_status == HFP_CALL_STATUS_COMING) ||
@@ -1291,9 +1290,8 @@ void _bt_hfp_call_hold_request(const char *t_cmd, void *t_device)
 
        if (ret == TRUE)
                _bt_call_hold_response(t_device, HFP_STATE_MNGR_ERR_NONE);
-       else {
+       else
                _bt_call_hold_response(t_device, HFP_STATE_MNGR_ERR_AG_FAILURE);
-       }
 }
 
 void _bt_hfp_key_press_request(const char *t_key_press, void *t_device)
index 2ba0b56..9e80a01 100755 (executable)
@@ -2071,9 +2071,9 @@ static gboolean __bt_hf_send_only(bt_hf_agent_info_t *bt_hf_info, gchar *data,
        gboolean pending = FALSE;
        GIOChannel *io_chan = bt_hf_info->io_chan;
 
-       if (send_flag) {
+       if (send_flag)
                pending = TRUE;
-       }
+
        __bt_hf_agent_add_queue(bt_hf_info->context, data, count, pending);
 
        if (pending)
@@ -2731,9 +2731,8 @@ static gboolean __bt_agent_request_service_level_conn(gpointer data)
                if (vconf_get_int(VCONFKEY_BT_DEVICE, &bt_device_state) == 0) {
                        DBG("BT device state is : 0x%X", bt_device_state);
                        bt_device_state |= VCONFKEY_BT_DEVICE_AG_CONNECTED;
-                       if (vconf_set_int(VCONFKEY_BT_DEVICE, bt_device_state) != 0) {
+                       if (vconf_set_int(VCONFKEY_BT_DEVICE, bt_device_state) != 0)
                                ERR("vconf_set_int failed");
-                       }
                } else {
                        ERR("vconf_get_int failed");
                }
@@ -2757,9 +2756,9 @@ static gboolean __bt_agent_request_service_level_conn(gpointer data)
        if (vconf_get_int(VCONFKEY_BT_DEVICE, &bt_device_state) == 0) {
                DBG("BT device state is : 0x%X", bt_device_state);
                bt_device_state |= VCONFKEY_BT_DEVICE_AG_CONNECTED;
-               if (vconf_set_int(VCONFKEY_BT_DEVICE, bt_device_state) != 0) {
+
+               if (vconf_set_int(VCONFKEY_BT_DEVICE, bt_device_state) != 0)
                        ERR("vconf_set_int failed");
-               }
        } else {
                ERR("vconf_get_int failed");
        }
@@ -2858,9 +2857,9 @@ static gboolean __bt_hf_agent_release(void)
        if (vconf_get_int(VCONFKEY_BT_DEVICE, &bt_device_state) == 0) {
                DBG("BT device state is : 0x%X", bt_device_state);
                bt_device_state ^= VCONFKEY_BT_DEVICE_AG_CONNECTED;
-               if (vconf_set_int(VCONFKEY_BT_DEVICE, bt_device_state) != 0) {
+
+               if (vconf_set_int(VCONFKEY_BT_DEVICE, bt_device_state) != 0)
                        ERR("vconf_set_int failed");
-               }
        } else {
                ERR("vconf_get_int failed");
        }
index 80f0eb7..03c0ea2 100644 (file)
@@ -490,13 +490,12 @@ static gboolean __bt_map_email_compare_folders(char *alias, char *folder)
                map_folder = "OUTBOX";
        } else if (!g_ascii_strncasecmp(alias, "[gmail]", strlen("[gmail]"))) {
                DBG("GMAIL Folders");
-               if (!g_ascii_strncasecmp(alias, "[Gmail]/Drafts", strlen("[Gmail]/Drafts"))) {
+               if (!g_ascii_strncasecmp(alias, "[Gmail]/Drafts", strlen("[Gmail]/Drafts")))
                        map_folder = "DRAFT";
-               } else if (!g_ascii_strncasecmp(alias, "[Gmail]/Sent", strlen("[Gmail]/Sent"))) {
+               else if (!g_ascii_strncasecmp(alias, "[Gmail]/Sent", strlen("[Gmail]/Sent")))
                        map_folder = "SENT";
-               } else if (!g_ascii_strncasecmp(alias, "[Gmail]/Trash", strlen("[Gmail]/Trash"))) {
+               else if (!g_ascii_strncasecmp(alias, "[Gmail]/Trash", strlen("[Gmail]/Trash")))
                        map_folder = "DELETED";
-               }
        }
 
        DBG("Equivalent MAP Folder for Alias: %s", map_folder);
index 78849ed..cb8670b 100644 (file)
@@ -869,9 +869,8 @@ static message_info_t *__bt_message_info_get(msg_struct_t msg_struct_handle,
        msg_struct_t addr_info = NULL;
 
        ret = msg_get_int_value(msg_struct_handle, MSG_MESSAGE_ID_INT, &msg_id);
-       if (ret != MSG_SUCCESS) {
+       if (ret != MSG_SUCCESS)
                ERR("Could not get Message ID");
-       }
 
        uid = _bt_add_id(msg_id, BT_MAP_ID_SMS);
 #ifdef ARCH64
@@ -952,9 +951,9 @@ next:
 
        ret = msg_get_int_value(msg_struct_handle,
                                MSG_MESSAGE_DISPLAY_TIME_INT, (int *)&dptime);
-       if (ret == MSG_SUCCESS) {
+       if (ret == MSG_SUCCESS)
                _get_msg_timestamp(&dptime, msg_datetime);
-       }
+
        DBG("Got date time: %s", msg_datetime);
 
        msg_info->datetime = g_strdup(msg_datetime);
@@ -962,9 +961,8 @@ next:
 
        ret = msg_get_int_value(msg_struct_handle, MSG_MESSAGE_TYPE_INT,
                                                                &m_type);
-       if (ret == MSG_SUCCESS) {
+       if (ret == MSG_SUCCESS)
                DBG("m_type %d\n", m_type);
-       }
 
        msg_info->type = g_strdup("SMS_GSM");
 
index 1a3b7c9..134b4d4 100644 (file)
@@ -931,9 +931,8 @@ static gboolean __bt_pb_add_contact(PbAgentData *agent, const char *filename,
                        }
                }
 
-               if (is_duplicated == FALSE) {
+               if (is_duplicated == FALSE)
                        contacts_svc_insert_contact(0, contact_record);
-               }
        } else {
                ERR("Fail \n");
        }
@@ -2340,9 +2339,8 @@ int main(void)
        tapi_result = tel_get_sim_msisdn(agent->tapi_handle,
                        __bluetooth_pb_tel_callback, agent);
 
-       if (tapi_result != TAPI_API_SUCCESS) {
+       if (tapi_result != TAPI_API_SUCCESS)
                __bt_pb_dbus_init(agent);
-       }
 
        __bluetooth_pb_agent_timeout_add_seconds(agent);
 
index 6cb6672..dd19d63 100644 (file)
@@ -996,9 +996,8 @@ static void __bluetooth_pb_vcard_append_photo_v21(GString *string,
 
        stat_info.st_size = 0;
 
-       if (0 > stat(filename, &stat_info)) {
+       if (0 > stat(filename, &stat_info))
                ERR("fstat failed, file does not exist %s", filename);
-       }
 
        if (PBAP_THUMB_FILE_SIZE > stat_info.st_size) {
                DBG_SECURE("File size small, so use thubnail %s\n", filename);
@@ -1042,9 +1041,10 @@ static void __bluetooth_pb_vcard_append_photo_v21(GString *string,
 
        res = image_util_foreach_supported_jpeg_colorspace(
                __bt_pbap_image_util_supported_jpeg_colorspace_cb, &img_info);
-       if (res != IMAGE_UTIL_ERROR_NONE) {
+
+       if (res != IMAGE_UTIL_ERROR_NONE)
                ERR("Image resizing is failed");
-       }
+
        FN_END;
 }