Fixed: Coding rule issues.
[apps/native/ug-wifi-direct.git] / ug-wifidirect / src / wfd_ug_popup.c
index bda5677..8ad8bbf 100755 (executable)
@@ -57,9 +57,9 @@ static void pushbutton_accept_connect_cb(void *data, Evas_Object * obj,
        }
        int result = -1;
        result = wifi_direct_accept_connection(ugd->mac_addr_req);
-       if (result != WIFI_DIRECT_ERROR_NONE) {
-               DBG(LOG_INFO,"Failed to connect");
-       }
+       if (result != WIFI_DIRECT_ERROR_NONE)
+               DBG(LOG_INFO, "Failed to connect");
+
        delete_popup(ugd);
 
        __FUNC_EXIT__;
@@ -79,9 +79,9 @@ static void pushbutton_reject_connect_cb(void *data, Evas_Object * obj,
        if (ugd->mac_addr_req[0] != '\0') {
                result = wifi_direct_reject_connection(ugd->mac_addr_req);
                if (result != WIFI_DIRECT_ERROR_NONE)
-                       DBG(LOG_INFO,"Failed to reject connection");
+                       DBG(LOG_INFO, "Failed to reject connection");
        } else {
-               DBG(LOG_INFO,"No Peer mac address");
+               DBG(LOG_INFO, "No Peer mac address");
        }
        delete_popup(ugd);
 
@@ -200,17 +200,15 @@ static void _wfd_ug_act_popup_hotspot_ok_cb(void *data, Evas_Object *obj, void *
 #endif
 
                /* while activating/deactivating, disable the buttons */
-               if (ugd->scan_toolbar) {
+               if (ugd->scan_toolbar)
                        wfd_ug_view_refresh_button(ugd->scan_toolbar, "IDS_WIFI_SK4_SCAN", FALSE);
-               }
 
-               if (ugd->multiconn_scan_stop_btn) {
+               if (ugd->multiconn_scan_stop_btn)
                        wfd_ug_view_refresh_button(ugd->multiconn_scan_stop_btn, "IDS_WIFI_SK4_SCAN", FALSE);
-               }
 
-               if (ugd->back_btn) {
+               if (ugd->back_btn)
                        elm_object_disabled_set(ugd->back_btn, TRUE);
-               }
+
                ugd->is_hotspot_locally_disabled = TRUE;
        }
 
@@ -266,17 +264,14 @@ static void _wfd_ug_act_popup_wifi_ok_cb(void *data, Evas_Object *obj, void *eve
                }
 #endif
                /* while activating/deactivating, disable the buttons */
-               if (ugd->scan_toolbar) {
+               if (ugd->scan_toolbar)
                        wfd_ug_view_refresh_button(ugd->scan_toolbar, "IDS_WIFI_SK4_SCAN", FALSE);
-               }
 
-               if (ugd->multiconn_scan_stop_btn) {
+               if (ugd->multiconn_scan_stop_btn)
                        wfd_ug_view_refresh_button(ugd->multiconn_scan_stop_btn, "IDS_WIFI_SK4_SCAN", FALSE);
-               }
 
-               if (ugd->back_btn) {
+               if (ugd->back_btn)
                        elm_object_disabled_set(ugd->back_btn, TRUE);
-               }
        }
 
        evas_object_del(ugd->act_popup);
@@ -322,9 +317,8 @@ gboolean _wfd_disconnect_idle_cb(gpointer user_data)
 
        wfd_ug_view_init_genlist(ugd, true);
 
-       if (0 != wfd_client_disconnect(NULL)) {
+       if (0 != wfd_client_disconnect(NULL))
                DBG(LOG_ERROR, "Disconnection Failed !!!\n");
-       }
 
        ugd->wfd_discovery_status = WIFI_DIRECT_DISCOVERY_SOCIAL_CHANNEL_START;
        discover_cb(WIFI_DIRECT_ERROR_NONE, WIFI_DIRECT_DISCOVERY_STARTED, ugd);
@@ -375,9 +369,9 @@ gboolean _wfd_cancel_connect_idle_cb(gpointer user_data)
                wfd_ug_view_init_genlist(ugd, true);
        } else {
                /* update the connecting icon */
-               for (iterator = ugd->raw_discovered_peer_list; iterator; iterator = iterator->next) {
+               for (iterator = ugd->raw_discovered_peer_list; iterator; iterator = iterator->next)
                        ((device_type_s *)iterator->data)->conn_status = PEER_CONN_STATUS_DISCONNECTED;
-               }
+
                wfd_ug_view_init_genlist(ugd, false);
        }
 
@@ -479,7 +473,7 @@ void act_popup_language_changed(void *data, Evas_Object *obj, void *event_info)
        elm_object_domain_translatable_text_set(btn2, PACKAGE,
                        "IDS_BR_SK_OK");
 
-       switch(popup_type) {
+       switch (popup_type) {
 
        case POPUP_TYPE_HOTSPOT_OFF:
                elm_object_domain_translatable_text_set(btn1, PACKAGE,
@@ -627,7 +621,7 @@ void wfd_ug_act_popup(void *data, const char *message, int popup_type)
 
                evas_object_smart_callback_add(btn1, "clicked", _wfd_ug_act_popup_cancel_cb, (void *)ugd);
                evas_object_smart_callback_add(btn2, "clicked", _wfd_ug_act_popup_cancel_connect_ok_cb, (void *)ugd);
-       } else if (popup_type == POP_TYPE_ACCEPT_CONNECTION ) {
+       } else if (popup_type == POP_TYPE_ACCEPT_CONNECTION) {
                evas_object_smart_callback_add(btn1, "clicked",
                                pushbutton_reject_connect_cb, (void *)ugd);
                evas_object_smart_callback_add(btn2, "clicked",
@@ -710,9 +704,8 @@ static void _wfd_ug_warn_popup_cb(void *data, Evas_Object *obj, void *event_info
        evas_object_del(ugd->warn_popup);
        ugd->warn_popup = NULL;
 
-       if (ugd->rename_entry) {
+       if (ugd->rename_entry)
                elm_object_focus_set(ugd->rename_entry, EINA_TRUE);
-       }
 
        __FUNC_EXIT__;
 }
@@ -736,7 +729,7 @@ void warn_popup_language_changed(void *data, Evas_Object *obj, void *event_info)
        elm_object_domain_translatable_text_set(btn, PACKAGE,
                        "IDS_BR_SK_OK");
 
-       switch(popup_type) {
+       switch (popup_type) {
        case POPUP_TYPE_ACTIVATE_FAIL_POLICY_RESTRICTS:
                elm_object_domain_translatable_text_set(ugd->warn_popup, PACKAGE,
                                "IDS_COM_POP_SECURITY_POLICY_RESTRICTS_USE_OF_WI_FI");