Fix codes for matching behavior with previous code 77/255477/3
authorJunghyun Yeon <jungh.yeon@samsung.com>
Fri, 19 Mar 2021 01:42:26 +0000 (10:42 +0900)
committerJunghyun Yeon <jungh.yeon@samsung.com>
Fri, 19 Mar 2021 06:43:21 +0000 (06:43 +0000)
Change-Id: Ia02f583952b346ee3dec85a8f4259164cddfba47
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
src/pkgmgrinfo_appinfo.c
src/pkgmgrinfo_pkginfo.c

index bbb000e..cf577a6 100644 (file)
@@ -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;
        }
index e266630..315166d 100644 (file)
@@ -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);