summaryrefslogtreecommitdiff
path: root/src/hash.c
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-01-17 09:28:02 +0200
committerTimo Teras <timo.teras@iki.fi>2009-01-17 09:33:02 +0200
commit1a9cc552a536e15083e5eceaad39f0f8019392c5 (patch)
tree4fb6f01eb7e367f21feba3e58dc9eb7543dc6ad2 /src/hash.c
parent298b5994cee7eb80edabf40b6adeffed1d94722e (diff)
downloadapk-tools-1a9cc552a536e15083e5eceaad39f0f8019392c5.tar.gz
apk-tools-1a9cc552a536e15083e5eceaad39f0f8019392c5.tar.bz2
apk-tools-1a9cc552a536e15083e5eceaad39f0f8019392c5.tar.xz
apk-tools-1a9cc552a536e15083e5eceaad39f0f8019392c5.zip
del: proper ordering of file db entry deletion
Diffstat (limited to 'src/hash.c')
-rw-r--r--src/hash.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/hash.c b/src/hash.c
index ee24a29..8013d06 100644
--- a/src/hash.c
+++ b/src/hash.c
@@ -100,9 +100,8 @@ void apk_hash_delete(struct apk_hash *h, apk_blob_t key)
if (h->ops->compare_item(item, key) == 0) {
hlist_del(pos, &h->buckets->item[hash]);
h->ops->delete_item(item);
- return;
+ break;
}
-
}
} else {
hlist_for_each(pos, &h->buckets->item[hash]) {
@@ -111,7 +110,7 @@ void apk_hash_delete(struct apk_hash *h, apk_blob_t key)
if (h->ops->compare(key, itemkey) == 0) {
hlist_del(pos, &h->buckets->item[hash]);
h->ops->delete_item(item);
- return;
+ break;
}
}
}