aboutsummaryrefslogtreecommitdiffstats
path: root/src/database.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/database.c')
-rw-r--r--src/database.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/database.c b/src/database.c
index 9d1c82b..806f873 100644
--- a/src/database.c
+++ b/src/database.c
@@ -1511,7 +1511,6 @@ void apk_db_init(struct apk_database *db)
int apk_db_open(struct apk_database *db, struct apk_db_options *dbopts)
{
const char *msg = NULL;
- struct apk_repository_list *repo = NULL;
struct statfs stfs;
apk_blob_t blob;
int r, fd, write_arch = FALSE;
@@ -1695,8 +1694,10 @@ int apk_db_open(struct apk_database *db, struct apk_db_options *dbopts)
}
if (!(dbopts->open_flags & APK_OPENF_NO_SYS_REPOS)) {
- list_for_each_entry(repo, &dbopts->repository_list, list)
- apk_db_add_repository(db, APK_BLOB_STR(repo->url));
+ char **repo;
+
+ foreach_array_item(repo, dbopts->repository_list)
+ apk_db_add_repository(db, APK_BLOB_STR(*repo));
if (dbopts->repositories_file == NULL) {
add_repos_from_file(db, db->root_fd, "etc/apk/repositories");