summaryrefslogtreecommitdiff
path: root/contrib/sepgsql/label.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/sepgsql/label.c')
-rw-r--r--contrib/sepgsql/label.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/contrib/sepgsql/label.c b/contrib/sepgsql/label.c
index 1d17d5a0c0..2b6a415093 100644
--- a/contrib/sepgsql/label.c
+++ b/contrib/sepgsql/label.c
@@ -207,23 +207,16 @@ sepgsql_subxact_callback(SubXactEvent event, SubTransactionId mySubid,
SubTransactionId parentSubid, void *arg)
{
ListCell *cell;
- ListCell *prev;
- ListCell *next;
if (event == SUBXACT_EVENT_ABORT_SUB)
{
- prev = NULL;
- for (cell = list_head(client_label_pending); cell; cell = next)
+ foreach(cell, client_label_pending)
{
pending_label *plabel = lfirst(cell);
- next = lnext(cell);
-
if (plabel->subid == mySubid)
client_label_pending
- = list_delete_cell(client_label_pending, cell, prev);
- else
- prev = cell;
+ = foreach_delete_current(client_label_pending, cell);
}
}
}