Handling le connection interval
[platform/core/connectivity/bluetooth-frwk.git] / bt-service / bt-service-opp-client.c
index d4310c5..a8d159b 100644 (file)
@@ -320,9 +320,8 @@ static void __bt_free_sending_data(gpointer data)
 
        ret_if(info == NULL);
 
-       for (i = 0; i < info->file_count; i++) {
+       for (i = 0; i < info->file_count; i++)
                g_free(info->file_path[i]);
-       }
 
        _bt_delete_request_id(info->request_id);
 
@@ -546,13 +545,12 @@ static void __bt_send_file_cb(GDBusProxy *proxy,
                GVariant *val;
                gsize len = 0;
                while (g_variant_iter_loop(iter, "{sv}", &key, &val)) {
-                       if (g_strcmp0(key, "Name") == 0) {
+                       if (g_strcmp0(key, "Name") == 0)
                                transfer_name = g_variant_dup_string(val, &len);
-                       } else if (g_strcmp0(key, "Filename") == 0) {
+                       else if (g_strcmp0(key, "Filename") == 0)
                                file_name = g_variant_dup_string(val, &len);
-                       } else if (g_strcmp0(key, "Size") == 0) {
+                       else if (g_strcmp0(key, "Size") == 0)
                                size = g_variant_get_uint64(val);
-                       }
                }
                g_variant_iter_free(iter);
        }
@@ -814,9 +812,6 @@ int _bt_opp_client_push_files(int request_id, GDBusMethodInvocation *context,
        } else {
                /* Insert data in the queue */
                data = g_malloc0(sizeof(bt_sending_data_t));
-               if (data == NULL)
-                       return BLUETOOTH_ERROR_MEMORY_ALLOCATION;
-
                data->file_path = g_new0(char *, file_count + 1);
                data->address = g_strdup(address);
                data->file_count = file_count;