summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-07-21 14:26:06 +0300
committerTimo Teras <timo.teras@iki.fi>2009-07-21 14:26:06 +0300
commit75802cb07dec505e381d01110a883f84a713ec19 (patch)
treec6a98098cd6f5b960815f77eb71733b83d72ed92 /src
parent1339b14365b8b791d60d58b3e055c0349205ae25 (diff)
downloadapk-tools-75802cb07dec505e381d01110a883f84a713ec19.tar.gz
apk-tools-75802cb07dec505e381d01110a883f84a713ec19.tar.bz2
apk-tools-75802cb07dec505e381d01110a883f84a713ec19.tar.xz
apk-tools-75802cb07dec505e381d01110a883f84a713ec19.zip
db: increase hash sizes a bit
Diffstat (limited to 'src')
-rw-r--r--src/database.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/database.c b/src/database.c
index 7c89dd3..d5f83e6 100644
--- a/src/database.c
+++ b/src/database.c
@@ -741,8 +741,8 @@ int apk_db_open(struct apk_database *db, const char *root, unsigned int flags)
memset(db, 0, sizeof(*db));
apk_hash_init(&db->available.names, &pkg_name_hash_ops, 1000);
apk_hash_init(&db->available.packages, &pkg_info_hash_ops, 4000);
- apk_hash_init(&db->installed.dirs, &dir_hash_ops, 1000);
- apk_hash_init(&db->installed.files, &file_hash_ops, 4000);
+ apk_hash_init(&db->installed.dirs, &dir_hash_ops, 2000);
+ apk_hash_init(&db->installed.files, &file_hash_ops, 10000);
list_init(&db->installed.packages);
db->cache_dir = apk_static_cache_dir;
@@ -1298,12 +1298,10 @@ static int apk_db_install_archive_entry(void *_ctx,
ctx->script_pending = TRUE;
return apk_db_run_pending_script(ctx);
}
-
r = apk_db_run_pending_script(ctx);
if (r != 0)
return r;
-
/* Show progress */
if (ctx->cb) {
size_t size = ctx->installed_size;
@@ -1323,7 +1321,9 @@ static int apk_db_install_archive_entry(void *_ctx,
/* Make sure the file is part of the cached directory tree */
if (diri == NULL ||
- apk_blob_compare(APK_BLOB_PTR_LEN(diri->dir->name, diri->dir->namelen), bdir) != 0) {
+ apk_blob_compare(APK_BLOB_PTR_LEN(diri->dir->name,
+ diri->dir->namelen),
+ bdir) != 0) {
struct hlist_node *n;
hlist_for_each_entry(diri, n, &pkg->owned_dirs, pkg_dirs_list) {