summaryrefslogtreecommitdiff
path: root/src/database.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/database.c')
-rw-r--r--src/database.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/database.c b/src/database.c
index d0ab6e2..9864543 100644
--- a/src/database.c
+++ b/src/database.c
@@ -1367,12 +1367,13 @@ static char *find_mountpoint(int atfd, const char *rel_path)
return ret;
}
-static void mark_in_cache(struct apk_database *db, int static_cache, int dirfd, const char *name, struct apk_package *pkg)
+static int mark_in_cache(struct apk_database *db, int static_cache, int dirfd, const char *name, struct apk_package *pkg)
{
if (pkg == NULL)
- return;
+ return 0;
pkg->repos |= BIT(APK_REPOSITORY_CACHED);
+ return 0;
}
static int add_repos_from_file(void *ctx, int dirfd, const char *file)
@@ -2052,9 +2053,7 @@ static int foreach_cache_file(void *pctx, int dirfd, const char *name)
}
}
no_pkg:
- ctx->cb(db, ctx->static_cache, dirfd, name, pkg);
-
- return 0;
+ return ctx->cb(db, ctx->static_cache, dirfd, name, pkg);
}
int apk_db_cache_foreach_item(struct apk_database *db, apk_cache_item_cb cb, int static_cache)