From: jiyong.min Date: Thu, 25 Jul 2019 01:38:16 +0000 (+0900) Subject: Add static at _destroy_search_list X-Git-Tag: accepted/tizen/unified/20190729.081053~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fa90e87f2b3b0d7c37e09d1b4bdd3b239337598f;p=platform%2Fcore%2Fapi%2Fmedia-controller.git Add static at _destroy_search_list Change-Id: If1162098d948be58c04d283de4e97e41c59f21f7 --- diff --git a/src/media_controller_metadata.c b/src/media_controller_metadata.c index 611768c..6bd93a1 100644 --- a/src/media_controller_metadata.c +++ b/src/media_controller_metadata.c @@ -304,6 +304,18 @@ int mc_playback_action_is_supported(mc_playback_ability_h ability, mc_playback_a return ret; } +static void __destroy_search_list(gpointer data) +{ + mc_search_item_s *search_item = (mc_search_item_s*)data; + + if (search_item) { + MC_SAFE_FREE(search_item->search_keyword); + if (search_item->data) + bundle_free(search_item->data); + MC_SAFE_FREE(search_item); + } +} + int mc_search_create(mc_search_h *search) { media_controller_search_s *mc_search = NULL; @@ -345,18 +357,6 @@ int mc_search_set_condition(mc_search_h search, mc_content_type_e content_type, return ret; } -void _destroy_search_list(gpointer data) -{ - mc_search_item_s *search_item = (mc_search_item_s*)data; - - if (search_item != NULL) { - MC_SAFE_FREE(search_item->search_keyword); - if (search_item->data != NULL) - bundle_free(search_item->data); - MC_SAFE_FREE(search_item); - } -} - int mc_search_destroy(mc_search_h search) { int ret = MEDIA_CONTROLLER_ERROR_NONE; @@ -364,7 +364,7 @@ int mc_search_destroy(mc_search_h search) mc_retvm_if(mc_search == NULL, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "search is NULL"); - g_list_free_full(mc_search->search_list, _destroy_search_list); + g_list_free_full(mc_search->search_list, __destroy_search_list); mc_search->search_list = NULL; MC_SAFE_FREE(mc_search);