Fix coverity issues (CID-109615, 110129, 108744, 105156, 108730) 63/174063/1 accepted/tizen/unified/20180403.152111 submit/tizen/20180329.051456
authorchleun.moon <chleun.moon@samsung.com>
Wed, 28 Mar 2018 01:46:43 +0000 (10:46 +0900)
committerchleun.moon <chleun.moon@samsung.com>
Wed, 28 Mar 2018 01:46:48 +0000 (10:46 +0900)
Change-Id: Iac0893efe9511251835085128f49da1762a84cb7
Signed-off-by: Cheoleun Moon <chleun.moon@samsung.com>
sources/libraries/Common/common_eap_connect.c
sources/libraries/Common/common_ip_info.c
sources/libraries/WlanManager/WlanManager/wlan_manager.c

index 7bc4f2e..7750dc8 100755 (executable)
@@ -427,7 +427,10 @@ static void _create_eap_cert_list(eap_connect_data_t *eap_data,
                return;
        }
 
-       certsvc_pkcs12_get_certificate_list_from_store(instance, WIFI_STORE, DISABLED, &certList, &list_length);
+       if (certsvc_pkcs12_get_certificate_list_from_store(instance, WIFI_STORE, DISABLED, &certList, &list_length) != CERTSVC_SUCCESS) {
+               INFO_LOG(UG_NAME_ERR, "Failed to get certificate list");
+               return;
+       }
 
        if (eap_data->cert_candidates) {
                g_slist_free_full(eap_data->cert_candidates, g_free);
@@ -2280,7 +2283,10 @@ eap_info_list_t *eap_info_append_items(wifi_manager_ap_h ap, Evas_Object* view_l
                /* Add EAP ID */
                bool is_paswd_set;
                temp_str = NULL;
-               wifi_manager_ap_get_eap_passphrase(ap, &temp_str, &is_paswd_set);
+               if (wifi_manager_ap_get_eap_passphrase(ap, &temp_str, &is_paswd_set) != WIFI_MANAGER_ERROR_NONE) {
+                       ERROR_LOG(UG_NAME_ERR, "Faile to get EAP passphrase!");
+                       return NULL;
+               }
                item = common_utils_add_2_line_txt_disabled_item(view_list,
                                WIFI_GENLIST_2LINE_TOP_TEXT_STYLE,
                                sc(str_pkg_name, I18N_TYPE_Identity),
index 1f9bfc1..461a52b 100755 (executable)
@@ -1490,11 +1490,17 @@ void ip_info_save_data(full_ip_info_t *ip_data)
                        txt = g_strdup_printf("%s:%s", proxy_addr, DEFAULT_GUIDE_PROXY_PORT);
 
                DEBUG_LOG(UG_NAME_NORMAL, "Set proxy type - manual : %s", txt);
-               if (prev_ip_info->proxy_type != WIFI_MANAGER_PROXY_TYPE_MANUAL)
-                       wifi_manager_ap_set_proxy_type(ap, WIFI_MANAGER_PROXY_TYPE_MANUAL);
+               if (prev_ip_info->proxy_type != WIFI_MANAGER_PROXY_TYPE_MANUAL) {
+                       if (wifi_manager_ap_set_proxy_type(ap, WIFI_MANAGER_PROXY_TYPE_MANUAL)
+                                       != WIFI_MANAGER_ERROR_NONE)
+                               ERROR_LOG(UG_NAME_NORMAL, "Fail to set proxy type");
+               }
 
-               if (g_strcmp0(prev_ip_info->proxy_data, txt) != 0)
-                       wifi_manager_ap_set_proxy_address(ap, WIFI_MANAGER_ADDRESS_FAMILY_IPV4, txt);
+               if (g_strcmp0(prev_ip_info->proxy_data, txt) != 0) {
+                       if (wifi_manager_ap_set_proxy_address(ap, WIFI_MANAGER_ADDRESS_FAMILY_IPV4, txt)
+                                       != WIFI_MANAGER_ERROR_NONE)
+                               ERROR_LOG(UG_NAME_NORMAL, "Fail to set proxy address");
+               }
 
                free_ip_info_text(ENTRY_TYPE_PROXY_ADDR);
                free_ip_info_text(ENTRY_TYPE_PROXY_PORT);
index 13579fd..c606583 100755 (executable)
@@ -152,9 +152,7 @@ int wlan_manager_start(void)
 
 int wlan_manager_forget(wifi_manager_ap_h ap)
 {
-       wifi_manager_forget_ap(manager_object->wifi, ap);
-
-       return WLAN_MANAGER_ERR_NONE;
+       return wifi_manager_forget_ap(manager_object->wifi, ap);
 }
 
 static void wlan_manager_network_event_cb(