Fix Redundant NULL check 59/242659/2
authorPrasadam Prashath Kumar <prasadam.p@samsung.com>
Fri, 28 Aug 2020 12:39:34 +0000 (18:09 +0530)
committerPrasadam Prashath Kumar <prasadam.p@samsung.com>
Fri, 28 Aug 2020 12:44:21 +0000 (18:14 +0530)
Change-Id: I71258bec917b76ba894311dff7ab70f8786dc438
Signed-off-by: Prasadam Prashath Kumar <prasadam.p@samsung.com>
src/mobileap_softap.c
src/mobileap_wifi.c

index 4418dfd..e785975 100755 (executable)
@@ -989,10 +989,6 @@ int _mh_core_enable_softap(const mobile_ap_type_e type, softap_settings_t *setti
 
        /** source wifi interface name */
        char *if_name = _get_wifi_source_interface_name();
-       if (!if_name) {
-               ERR("Source interface is null.\n");
-               return MOBILE_AP_ERROR_INTERNAL;
-       }
 
        if (__mh_core_softap_firmware_start(settings->tether_type, if_name) < 0)
                return MOBILE_AP_ERROR_INTERNAL;
@@ -1574,8 +1570,7 @@ int _mh_core_enable_masquerade(const char *ext_if)
 
        int fd = -1;
        char *src_if = _get_wifi_source_interface_name();
-       if (src_if)
-               ERR("src_if: %s ext_if: %s", src_if, ext_if);
+       DBG("src_if: %s ext_if: %s", src_if, ext_if);
 
        fd = open(IP_FORWARD, O_WRONLY);
        if (fd < 0) {
index f46a324..651d804 100755 (executable)
@@ -831,10 +831,6 @@ mobile_ap_error_code_e _disable_wifi_tethering(Tethering *obj, mobile_ap_address
        }
 
        char *src_if = _get_wifi_source_interface_name();
-       if (!src_if) {
-               ERR("Source interface is null\n"); //LCOV_EXCL_LINE
-               return MOBILE_AP_ERROR_INTERNAL;
-       }
 
        _block_device_sleep();
        if (address_type != MOBILE_AP_ADDRESS_TYPE_IPV6) {
@@ -991,10 +987,6 @@ mobile_ap_error_code_e _disable_soft_ap(Softap *obj)
        }
 
        char *src_if = _get_wifi_source_interface_name();
-       if (!src_if) {
-               ERR("Source interface is null\n"); //LCOV_EXCL_LINE
-               return MOBILE_AP_ERROR_INTERNAL;
-       }
 
        _block_device_sleep();
 #ifdef TIZEN_FEATURE_MULTICAST