Fix the coding style errors 29/102629/1
authorDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 6 Dec 2016 08:19:56 +0000 (17:19 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 6 Dec 2016 08:19:56 +0000 (17:19 +0900)
Change-Id: Ifba36e6102bb60339d2d3c9c52ef596c7e10fed8
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
bt-api/bt-gatt-client.c
bt-api/bt-gatt-service.c
bt-api/bt-rfcomm-client.c
bt-api/bt-rfcomm-server.c
bt-httpproxy/bt-httpproxy.c
bt-service/bt-service-adapter.c

index 9186ea2..23f3d06 100644 (file)
@@ -664,9 +664,10 @@ BT_EXPORT_API int bluetooth_gatt_get_characteristics_property(
                } else if (!g_strcmp0(key, "Flags")) {
                        g_variant_get(value, "as", &char_perm_iter);
                        characteristic->permission = 0x00;
-                       while (g_variant_iter_loop(char_perm_iter, "s", &permission)) {
+
+                       while (g_variant_iter_loop(char_perm_iter, "s", &permission))
                                characteristic->permission |= __get_permission_flag(permission);
-                       }
+
                        g_variant_iter_free(char_perm_iter);
                } else if (!g_strcmp0(key, "Descriptors")) {
                        g_variant_get(value, "ao", &char_desc_iter);
index 50957ba..e318d14 100644 (file)
@@ -724,7 +724,7 @@ static void __bt_gatt_char_method_call(GDBusConnection *connection,
                        if (response_needed)
                                g_dbus_method_invocation_return_value(invocation, NULL);
                        else
-                               g_object_unref (invocation);
+                               g_object_unref(invocation);
                        return;
                }
 
@@ -735,7 +735,7 @@ static void __bt_gatt_char_method_call(GDBusConnection *connection,
                        if (response_needed)
                                g_dbus_method_invocation_return_value(invocation, NULL);
                        else
-                               g_object_unref (invocation);
+                               g_object_unref(invocation);
                        return;
                }
 
@@ -757,7 +757,7 @@ static void __bt_gatt_char_method_call(GDBusConnection *connection,
                                if (response_needed)
                                        g_dbus_method_invocation_return_value(invocation, NULL);
                                else
-                                       g_object_unref (invocation);
+                                       g_object_unref(invocation);
                                return;
                        }
 
@@ -776,7 +776,7 @@ static void __bt_gatt_char_method_call(GDBusConnection *connection,
                        req_info->context = invocation;
                        gatt_requests = g_slist_append(gatt_requests, req_info);
                } else {
-                       g_object_unref (invocation);
+                       g_object_unref(invocation);
                }
 
                _bt_common_event_cb(
@@ -962,7 +962,7 @@ static void __bt_gatt_desc_method_call(GDBusConnection *connection,
                        if (response_needed)
                                g_dbus_method_invocation_return_value(invocation, NULL);
                        else
-                               g_object_unref (invocation);
+                               g_object_unref(invocation);
                        return;
                }
 
@@ -973,7 +973,7 @@ static void __bt_gatt_desc_method_call(GDBusConnection *connection,
                        if (response_needed)
                                g_dbus_method_invocation_return_value(invocation, NULL);
                        else
-                               g_object_unref (invocation);
+                               g_object_unref(invocation);
                        return;
                }
 
@@ -995,7 +995,7 @@ static void __bt_gatt_desc_method_call(GDBusConnection *connection,
                                if (response_needed)
                                        g_dbus_method_invocation_return_value(invocation, NULL);
                                else
-                                       g_object_unref (invocation);
+                                       g_object_unref(invocation);
                                return;
                        }
                        data = (char *)g_variant_get_data(var);
@@ -1013,7 +1013,7 @@ static void __bt_gatt_desc_method_call(GDBusConnection *connection,
                        req_info->context = invocation;
                        gatt_requests = g_slist_append(gatt_requests, req_info);
                } else {
-                       g_object_unref (invocation);
+                       g_object_unref(invocation);
                }
 
                _bt_common_event_cb(
index 21b3fea..ec57e1e 100644 (file)
@@ -452,7 +452,7 @@ void _bt_rfcomm_client_disconnect_all(void)
                        conn_info->disconnected = TRUE;
 
                        _bt_disconnect_profile(conn_info->bt_addr, info->uuid,
-                                       NULL,NULL);
+                                       NULL, NULL);
 
                }
 
index 5053387..aa59276 100644 (file)
@@ -367,7 +367,7 @@ int new_server_connection(const char *path, int fd, bluetooth_device_address_t *
 
                close(fd);
                _bt_convert_addr_type_to_string(addr_str, addr->addr);
-               _bt_disconnect_profile(addr_str, info->uuid, NULL,NULL);
+               _bt_disconnect_profile(addr_str, info->uuid, NULL, NULL);
 
                return -1;
        }
@@ -505,7 +505,7 @@ void _bt_rfcomm_server_disconnect_all(void)
 
                        _bt_convert_addr_type_to_string(addr,
                                                        conn_info->addr.addr);
-                       _bt_disconnect_profile(addr, info->uuid, NULL,NULL);
+                       _bt_disconnect_profile(addr, info->uuid, NULL, NULL);
                }
 
                server = server->next;
index 5efd71a..471aeb2 100644 (file)
@@ -118,15 +118,18 @@ static char *__hps_convert_uuid_to_uuid128(const char *uuid)
        len = strlen(uuid);
 
        switch (len) {
-       case 4:         /* UUID 16bits */
+       case 4:
+               /* UUID 16bits */
                uuid128 = g_strdup_printf("0000%s-0000-1000-8000-00805F9B34FB", uuid);
                break;
 
-       case 8:         /* UUID 32bits */
+       case 8:
+               /* UUID 32bits */
                uuid128 = g_strdup_printf("%s-0000-1000-8000-00805F9B34FB", uuid);
                break;
 
-       case 36:        /* UUID 128bits */
+       case 36:
+               /* UUID 128bits */
                uuid128 = strdup(uuid);
                break;
 
@@ -633,9 +636,10 @@ void _bt_hps_head_response_cb(SoupSession *session,
                // Write Data to Status Code Characteristic
 #ifdef HPS_GATT_DB
                data_status = (hdr_len > MAX_ENTITY_LENGTH) ? DS_HEADER_TRUNCATED : DS_HEADER_RECEIVED;
-               if (data_status == DS_BODY_TRUNCATED && SOUP_STATUS_IS_SUCCESSFUL(http_status)) {
+
+               if (data_status == DS_BODY_TRUNCATED && SOUP_STATUS_IS_SUCCESSFUL(http_status))
                        _bt_hps_set_notify_read_status(http_hdr_obj_path, 0, data_status, http_status);
-               }
+
                _bt_hps_send_status_notification(http_status, data_status, &addr_hex);
 #else
                status[0] = http_status & 0x0F;
@@ -755,9 +759,10 @@ void _bt_hps_get_response_cb(SoupSession *session,
                // Write Data to Status Code Characteristic
 #ifdef HPS_GATT_DB
                data_status = (body->length > MAX_ENTITY_LENGTH) ? DS_BODY_TRUNCATED : DS_BODY_RECEIVED;
-               if (data_status == DS_BODY_TRUNCATED && SOUP_STATUS_IS_SUCCESSFUL(http_status)) {
+
+               if (data_status == DS_BODY_TRUNCATED && SOUP_STATUS_IS_SUCCESSFUL(http_status))
                        _bt_hps_set_notify_read_status(http_entity_obj_path, 0, data_status, http_status);
-               }
+
                _bt_hps_send_status_notification(http_status, data_status, &addr_hex);
 
 #else
@@ -806,9 +811,10 @@ void _bt_hps_get_response_cb(SoupSession *session,
                // Write Data to Status Code Characteristic
 #ifdef HPS_GATT_DB
                data_status = (hdr_len > MAX_HEADER_LENGTH) ? DS_HEADER_TRUNCATED : DS_HEADER_RECEIVED;
-               if (data_status == DS_HEADER_TRUNCATED && SOUP_STATUS_IS_SUCCESSFUL(http_status)) {
+
+               if (data_status == DS_HEADER_TRUNCATED && SOUP_STATUS_IS_SUCCESSFUL(http_status))
                        _bt_hps_set_notify_read_status(http_hdr_obj_path, 0, data_status, http_status);
-               }
+
                _bt_hps_send_status_notification(http_status, data_status, &addr_hex);
 #else
                status[0] = http_status & 0x0F;
index 33bc5d0..0b752d6 100644 (file)
@@ -223,7 +223,7 @@ int __bt_set_visible_time(int timeout)
 #ifndef TIZEN_PROFILE_WEARABLE
 #ifdef TIZEN_FEATURE_BT_DPM
        _bt_dpm_get_bluetooth_limited_discoverable_state(&discoverable_state);
-       if(discoverable_state != DPM_RESTRICTED) {
+       if (discoverable_state != DPM_RESTRICTED) {
 #endif
        if (vconf_set_int(BT_FILE_VISIBLE_TIME, timeout) != 0)
                BT_ERR("Set vconf failed");