From: Semun Lee Date: Sun, 20 Aug 2017 01:50:20 +0000 (+0900) Subject: Fix bug on adding disable filter for appinfo filter X-Git-Tag: accepted/tizen/4.0/unified/20170828.223919~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=sidebyside;h=78a62f1e24a93dfe5679935a5a5be461e485b36f;p=platform%2Fcore%2Fappfw%2Fpkgmgr-info.git Fix bug on adding disable filter for appinfo filter - Fixed misused pointer for storing enum value Change-Id: Ic62e7513e4e99aa39b6c5027b26296233e94926f Signed-off-by: Semun Lee --- diff --git a/src/pkgmgrinfo_appinfo.c b/src/pkgmgrinfo_appinfo.c index c978a8e..a826ec3 100644 --- a/src/pkgmgrinfo_appinfo.c +++ b/src/pkgmgrinfo_appinfo.c @@ -358,8 +358,7 @@ static void __free_applications(gpointer data) static gint __disable_chk_func(gconstpointer data1, gconstpointer data2) { pkgmgrinfo_node_x *node = (pkgmgrinfo_node_x *)data1; - pkgmgrinfo_appinfo_disable_type *value = - (pkgmgrinfo_appinfo_disable_type *)data2; + pkgmgrinfo_appinfo_disable_type value = GPOINTER_TO_INT(data2); if (value == E_APPINFO_DISABLE_TYPE_PKG) return (node->prop == E_PMINFO_APPINFO_PROP_PKG_DISABLE) @@ -377,7 +376,7 @@ static bool __check_disable_filter_exist(pkgmgrinfo_filter_x *filter, if (filter == NULL) return false; - link = g_slist_find_custom(filter->list, &type, __disable_chk_func); + link = g_slist_find_custom(filter->list, GINT_TO_POINTER(type), __disable_chk_func); if (link) return true;