summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2009-06-26 16:24:55 +0300
committerPanu Matilainen <pmatilai@redhat.com>2009-06-26 16:24:55 +0300
commitd3956140c2757a5929d4517cf54e5d9c06e11355 (patch)
tree2bd0befb0d8cae433dbeae2826d25a0444b4316a
parentd1b399761ffe554f3f3c4ced187c3b8ec58233fb (diff)
downloadlibrpm-tizen-d3956140c2757a5929d4517cf54e5d9c06e11355.tar.gz
librpm-tizen-d3956140c2757a5929d4517cf54e5d9c06e11355.tar.bz2
librpm-tizen-d3956140c2757a5929d4517cf54e5d9c06e11355.zip
Handle hook unregistering itself
-rw-r--r--rpmio/rpmhook.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/rpmio/rpmhook.c b/rpmio/rpmhook.c
index 6c9b63acf..bece9da04 100644
--- a/rpmio/rpmhook.c
+++ b/rpmio/rpmhook.c
@@ -205,10 +205,12 @@ static void rpmhookTableCallArgs(rpmhookTable *table, const char *name,
{
int n = rpmhookTableFindBucket(table, name);
rpmhookItem item = (*table)->bucket[n].item;
+ rpmhookItem next;
while (item) {
+ next = item->next;
if (item->func(args, item->data) != 0)
break;
- item = item->next;
+ item = next;
}
}