Fix the coverity issue (Dereference after null check)
[platform/core/connectivity/bluetooth-frwk.git] / bt-api / bt-common.c
index 7e552bb..a4dbd38 100644 (file)
@@ -535,8 +535,6 @@ const char *_bt_convert_service_function_to_string(int function)
                {BT_REMOVE_WHITE_LIST, "BT_REMOVE_WHITE_LIST"},
                {BT_CLEAR_WHITE_LIST, "BT_CLEAR_WHITE_LIST"},
                {BT_REGISTER_SCAN_FILTER, "BT_REGISTER_SCAN_FILTER"},
-               {BT_UNREGISTER_SCAN_FILTER, "BT_UNREGISTER_SCAN_FILTER"},
-               {BT_UNREGISTER_ALL_SCAN_FILTERS, "BT_UNREGISTER_ALL_SCAN_FILTERS"},
                {BT_IS_SCAN_FILTER_SUPPORTED, "BT_IS_SCAN_FILTER_SUPPORTED"},
                {BT_GET_PROFILE_CONNECTED_DEVICES, "BT_GET_PROFILE_CONNECTED_DEVICES"},
                {BT_ENABLE_FORCE_HCI_DUMP, "BT_ENABLE_FORCE_HCI_DUMP"},
@@ -1405,7 +1403,7 @@ void _bt_print_api_caller_name(void)
 
        if (fgets(buf, 256, fp) != NULL) {
                str_list = g_strsplit(buf, " ", -1);
-               if (str_list[0] != '\0')
+               if (str_list[0] != NULL)
                        BT_INFO("Caller : %s", str_list[0]);
                g_strfreev(str_list);
        }
@@ -2509,4 +2507,3 @@ BT_EXPORT_API int bluetooth_unregister_callback(void)
 
        return BLUETOOTH_ERROR_NONE;
 }
-