Fix style issues 60/259060/2 submit/tizen/20210601.231319
authorrohit singh <rohit.singh@samsung.com>
Mon, 31 May 2021 10:32:41 +0000 (16:02 +0530)
committerPyun DoHyun <dh79.pyun@samsung.com>
Tue, 1 Jun 2021 22:52:18 +0000 (22:52 +0000)
This patches fixes the styles issues as shown
in the check-patch script.

Change-Id: Iccf3afcab19debd2850b5d8fd1a3250ee894a36d
Signed-off-by: rohit.singh <rohit.singh@samsung.com>
ua-api/src/ua-event-handler.c
ua-daemon/src/ua-manager-core.c
ua-daemon/src/ua-manager-main.c
ua-daemon/src/ua-manager-request-handler.c

index e035209..7a19c87 100644 (file)
@@ -417,7 +417,7 @@ void _uam_register_name_owner_changed(void)
                return;
        }
 
-       if(owner_sig_id != 0)
+       if (owner_sig_id != 0)
                return;
 
        owner_sig_id = g_dbus_connection_signal_subscribe(conn,
index e85edd7..22ea76b 100755 (executable)
@@ -2228,9 +2228,8 @@ static int _uam_core_update_svc_dev_info(const char *device_id, uam_tech_type_e
                svc->service = g_strdup(svc_name);
 
                svc->payload = g_new0(uam_db_payload_info_t, 1);
-               if (payload_info) {
+               if (payload_info)
                        __uam_copy_uam_payload_info(svc->payload, payload_info);
-               }
 
                svc_devs = g_slist_append(svc_devs, svc);
        }
@@ -2240,10 +2239,9 @@ static int _uam_core_update_svc_dev_info(const char *device_id, uam_tech_type_e
        if (last_seen > 0)
                svc->last_seen = last_seen;
 
-       if (payload_info) {
-               /* TODO free existing payload structure */
+       /* TODO free existing payload structure */
+       if (payload_info)
                __uam_copy_uam_payload_info(svc->payload, payload_info);
-       }
 
        UAM_DBG("Service [%s] device [%s] tech_type [%d] discriminant [%d] " \
                "last_seen [%llu] payload primary key [%d] app number [%d]",
@@ -2809,9 +2807,9 @@ static int __uam_core_start_detection(int detection_type,
        retv_if(NULL == svc_name, UAM_ERROR_INVALID_PARAMETER);
 
        l = g_slist_find_custom(services, svc_name, __compare_svc_name);
-       if (!l) {
+       if (!l)
                UAM_ERR("Service not found");
-       }
+
        retv_if(NULL == l, UAM_ERROR_NOT_FOUND);
        retv_if(NULL == l->data, UAM_ERROR_INTERNAL);
 
@@ -3432,11 +3430,10 @@ int _uam_core_handle_device_added(int status,
        __get_default_service_name(dev_info->app_num, &default_service_name);
 
        l = g_slist_find_custom(services, default_service_name, __compare_svc_name);
-       if (!l) {
+       if (!l)
                UAM_WARN("Default service not found");
-       } else {
+       else
                service = l->data;
-       }
 
        /** updates for svc dev*/
        ret = _uam_core_update_svc_dev_info(dev_info->device_id, dev_info->type,
@@ -3760,7 +3757,7 @@ static int __uam_core_update_device_addr(uam_db_address_info_t *addr,
        retv_if(!addr, UAM_ERROR_INVALID_PARAMETER);
        retv_if(!dev_info, UAM_ERROR_INVALID_PARAMETER);
 
-       switch(addr->addr_type) {
+       switch (addr->addr_type) {
        case UAM_ADDR_TYPE_IPv4:
                if (strcasecmp(addr->address, dev_info->ipv4_addr)) {
                        UAM_DBG("Old IPv4: %s, New IPv4: %s",
index 3e1e03e..523baea 100644 (file)
@@ -50,20 +50,20 @@ static void __uam_manager_cleanup(void)
 
 static gboolean __uam_manager_terminate_idle_cb(gpointer user_data)
 {
-    FUNC_ENTRY;
+       FUNC_ENTRY;
 
-    __uam_manager_cleanup();
+       __uam_manager_cleanup();
 
-    UAM_INFO("Quit g_main loop");
+       UAM_INFO("Quit g_main loop");
 
-    if (main_loop)
-        g_main_loop_quit(main_loop);
+       if (main_loop)
+               g_main_loop_quit(main_loop);
 
-    UAM_INFO("ua-manager terminated");
+       UAM_INFO("ua-manager terminated");
 
-    FUNC_EXIT;
+       FUNC_EXIT;
 
-    return FALSE;
+       return FALSE;
 }
 
 void _uam_manager_terminate(void)
index dea0cad..e15b65b 100755 (executable)
@@ -1393,7 +1393,7 @@ static unsigned int __uam_manager_get_device_type(
 
                break;
        }
-       default :
+       default:
                device_type = 0;
                break;
        }