resolved the code rule warnings
[platform/core/connectivity/bluetooth-frwk.git] / bt-oal / bluez_hal / src / bt-hal-hdp-dbus-handler.c
index 143e36f..767df54 100644 (file)
@@ -47,14 +47,14 @@ typedef struct {
        int channel_id;
        char *obj_path;
        int fd;
-}hdp_conn_info_t;
+} hdp_conn_info_t;
 
 typedef struct {
        int id;
        char *path;
        int channel_type;
        GSList *conn_list;
-}hdp_app_data_t;
+} hdp_app_data_t;
 
 static handle_stack_msg event_cb = NULL;
 static int latest_id = -1;
@@ -77,8 +77,7 @@ static void __hdp_send_conn_event(hdp_conn_info_t *conn_info, int state)
        if (!event_cb) {
                ERR("HDP dbus handler callback not registered");
                g_free(conn_info);
-       }
-       else
+       } else
                event_cb(HAL_EV_HDP_CONN_STATE, (void *)&ev, sizeof(ev));
 
        DBG("-");
@@ -219,7 +218,7 @@ static hdp_conn_info_t *__hdp_app_create_incomming_conn_info(const char *path)
        DBG("+");
 
        conn = _bt_hal_get_system_gconn();
-       if(!conn) {
+       if (!conn) {
                ERR("_bt_hal_get_system_gconn returned NULL, return");
                return NULL;
        }
@@ -340,7 +339,7 @@ static int __hdp_acquire_fd(const char *path)
        DBG("+");
 
        conn = _bt_hal_get_system_gconn();
-       if(!conn) {
+       if (!conn) {
                ERR("_bt_hal_get_system_gconn returned NULL, return");
                return  -1;
        }
@@ -517,16 +516,13 @@ static void __hdp_event_filter(GDBusConnection *connection,
 }
 
 static int __hdp_filter_subscribe_signal(GDBusConnection *conn,
-                               gboolean subscribe)
+               gboolean subscribe)
 {
        static guint subs_add_filter_id = 0;
 
        if (conn == NULL)
                return BT_HAL_ERROR_INVALID_PARAM;
 
-       if (subscribe && subs_add_filter_id) {
-       }
-
        if (subscribe) {
                if (subs_add_filter_id == 0) {
                        subs_add_filter_id = g_dbus_connection_signal_subscribe(
@@ -554,7 +550,7 @@ static int __hdp_add_filter(void)
        DBG("+");
 
        hdp_conn = _bt_hal_get_system_gconn();
-       if(!hdp_conn) {
+       if (!hdp_conn) {
                ERR("_bt_hal_get_system_gconn returned NULL, return");
                return BT_HAL_ERROR_INTERNAL;
        }
@@ -571,7 +567,7 @@ static int __hdp_remove_filter(void)
        DBG("+");
 
        hdp_conn = _bt_hal_get_system_gconn();
-       if(!hdp_conn) {
+       if (!hdp_conn) {
                ERR("_bt_hal_get_system_gconn returned NULL, return");
                return BT_HAL_ERROR_INTERNAL;
        }
@@ -674,7 +670,7 @@ static GDBusProxy *__get_health_device_proxy(char *address)
        DBG("dev_path: %s", dev_path);
 
        conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &err);
-       if(!conn) {
+       if (!conn) {
                ERR("ERROR: Can't get on system bus [%s]", err->message);
                g_clear_error(&err);
                g_free(dev_path);
@@ -775,7 +771,7 @@ bt_status_t _bt_hal_dbus_handler_hdp_register_application(int role,
        DBG("+");
 
        conn = _bt_hal_get_system_gconn();
-       if(!conn) {
+       if (!conn) {
                ERR("_bt_hal_get_system_gconn returned NULL, return");
                return BT_STATUS_FAIL;
        }
@@ -873,7 +869,7 @@ bt_status_t _bt_hal_dbus_handler_hdp_unregister_application(int app_id)
        }
 
        conn = _bt_hal_get_system_gconn();
-       if(!conn) {
+       if (!conn) {
                ERR("_bt_hal_get_system_gconn returned NULL, return");
                return BT_STATUS_FAIL;
        }