From: Junghyun Yeon Date: Fri, 19 Mar 2021 01:42:26 +0000 (+0900) Subject: Fix codes for matching behavior with previous code X-Git-Tag: accepted/tizen/unified/20210323.122846~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ae76d77e6338ced127ce012ebb1cc314533298b6;p=platform%2Fcore%2Fappfw%2Fpkgmgr-info.git Fix codes for matching behavior with previous code Change-Id: Ia02f583952b346ee3dec85a8f4259164cddfba47 Signed-off-by: Junghyun Yeon --- diff --git a/src/pkgmgrinfo_appinfo.c b/src/pkgmgrinfo_appinfo.c index bbb000e..cf577a6 100644 --- a/src/pkgmgrinfo_appinfo.c +++ b/src/pkgmgrinfo_appinfo.c @@ -644,7 +644,7 @@ static int _appinfo_get_filtered_foreach_appinfo(uid_t uid, ret = _appinfo_get_applications(uid, uid, filter, flag | PMINFO_APPINFO_GET_BASICINFO, list); - if (ret != PMINFO_R_OK) { + if (ret == PMINFO_R_ERROR) { g_hash_table_destroy(list); return ret; } diff --git a/src/pkgmgrinfo_pkginfo.c b/src/pkgmgrinfo_pkginfo.c index e266630..315166d 100644 --- a/src/pkgmgrinfo_pkginfo.c +++ b/src/pkgmgrinfo_pkginfo.c @@ -157,9 +157,9 @@ static int _pkginfo_get_filtered_foreach_pkginfo(uid_t uid, } ret = _pkginfo_get_packages(uid, filter, flag, list); - if (ret != PMINFO_R_OK) { + if (ret == PMINFO_R_ERROR) { g_hash_table_destroy(list); - return PMINFO_R_ERROR; + return ret; } g_hash_table_iter_init(&iter, list);