Fit the coding rule 09/172609/1
authorchleun.moon <chleun.moon@samsung.com>
Wed, 14 Mar 2018 23:48:11 +0000 (08:48 +0900)
committerchleun.moon <chleun.moon@samsung.com>
Wed, 14 Mar 2018 23:48:16 +0000 (08:48 +0900)
Change-Id: Ie69592b5c182491ec58936660397907a29c59f7b
Signed-off-by: Cheoleun Moon <chleun.moon@samsung.com>
src/asp-manager-gdbus.c
src/tech/asp-tech-p2p.c

index 57b13c9..f5c282b 100755 (executable)
@@ -1135,11 +1135,10 @@ void asp_manager_gdbus_notify_advertise_status(guint32 adv_id, guint8 status, gi
        __ASP_LOG_FUNC_ENTER__;
 
        AspService *service = asp_get_manager()->service_obj;
-       if (service) {
+       if (service)
                asp_service_emit_advertise_status_changed(service, adv_id, status, reason);
-       } else {
+       else
                ASP_LOGE("ERROR: service obj is NULL");
-       }
 
        __ASP_LOG_FUNC_EXIT__;
 }
@@ -1173,9 +1172,8 @@ void asp_manager_gdbus_notify_search_result(guint32 search_id,
 
        if (instance_name)
                g_variant_builder_add(builder, "{sv}", "instance_name", g_variant_new("s", instance_name));
-       if (service_info_map != NULL) {
+       if (service_info_map != NULL)
                g_variant_builder_add(builder, "{sv}", "service_info", __g_hash_table_to_g_variant(service_info_map));
-       }
        g_variant_builder_add(builder, "{sv}", "service_status", g_variant_new("y", service_status));
 
        params = g_variant_new("a{sv}", builder);
@@ -1183,11 +1181,10 @@ void asp_manager_gdbus_notify_search_result(guint32 search_id,
 
        ASP_LOGD("Created parameter for search result signal");
 
-       if (service) {
+       if (service)
                asp_service_emit_search_result(service, params);
-       } else {
+       else
                ASP_LOGE("ERROR: service obj is NULL");
-       }
 
        __ASP_LOG_FUNC_EXIT__;
 }
@@ -1217,11 +1214,10 @@ void asp_manager_gdbus_notify_session_request(gint32 error_code,
        g_variant_builder_unref(builder);
 
        ASP_LOGD("Created parameter for session requested signal");
-       if (session) {
+       if (session)
                asp_session_emit_session_request(session, params);
-       } else {
+       else
                ASP_LOGE("ERROR: session obj is NULL");
-       }
 
        __ASP_LOG_FUNC_EXIT__;
 }
@@ -1246,11 +1242,10 @@ void asp_manager_gdbus_notify_session_config_request(gchar * session_mac,
        g_variant_builder_unref(builder);
 
        ASP_LOGD("Created parameter for session config requested signal");
-       if (session) {
+       if (session)
                asp_session_emit_session_config_request(session, params);
-       } else {
+       else
                ASP_LOGE("ERROR: session obj is NULL");
-       }
 
        __ASP_LOG_FUNC_EXIT__;
 }
@@ -1274,11 +1269,10 @@ void asp_manager_gdbus_notify_connect_status(gchar *session_mac,
        g_variant_builder_unref(builder);
 
        ASP_LOGD("Created parameter for connect status signal");
-       if (session) {
+       if (session)
                asp_session_emit_connect_status(session, params);
-       } else {
+       else
                ASP_LOGE("ERROR: session obj is NULL");
-       }
 
        __ASP_LOG_FUNC_EXIT__;
 }
@@ -1304,11 +1298,10 @@ void asp_manager_gdbus_notify_session_status(gchar *session_mac,
        g_variant_builder_unref(builder);
 
        ASP_LOGD("Created parameter for session status signal");
-       if (session) {
+       if (session)
                asp_session_emit_session_status(session, params);
-       } else {
+       else
                ASP_LOGE("ERROR: session obj is NULL");
-       }
 
        __ASP_LOG_FUNC_EXIT__;
 }
@@ -1335,11 +1328,10 @@ void asp_manager_gdbus_notify_port_status(gchar * session_mac,
        g_variant_builder_unref(builder);
 
        ASP_LOGD("Created parameter for port status signal");
-       if (session) {
+       if (session)
                asp_session_emit_port_status(session, params);
-       } else {
+       else
                ASP_LOGE("ERROR: session obj is NULL");
-       }
 
        __ASP_LOG_FUNC_EXIT__;
 }
index b5dde85..3c65f9f 100755 (executable)
@@ -616,9 +616,9 @@ void asp_tech_p2p_process_session_peer_ip(GDBusConnection *connection,
                        g_variant_get(var, "u", &session_id);
                } else if (!g_strcmp0(key, "service_mac")) {
                        if (asp_dbus_unpack_ay(service_mac, var, MAC_LEN) < 0) {
-                                g_variant_iter_free(iter);
-                                return;
-                        }
+                               g_variant_iter_free(iter);
+                               return;
+                       }
 
                } else if (!g_strcmp0(key, "assigned_ip_address")) {
                        g_variant_get(var, "&s", &peer_ip);