#include "postgres.h"
#include "lib/ilist.h"
Go to the source code of this file.
Defines | |
#define | ILIST_INCLUDE_DEFINITIONS |
Functions | |
void | slist_delete (slist_head *head, slist_node *node) |
void slist_delete | ( | slist_head * | head, | |
slist_node * | node | |||
) |
Definition at line 34 of file ilist.c.
References Assert, cur, slist_head::head, slist_node::next, NULL, PG_USED_FOR_ASSERTS_ONLY, and slist_check.
{ slist_node *last = &head->head; slist_node *cur; bool found PG_USED_FOR_ASSERTS_ONLY = false; while ((cur = last->next) != NULL) { if (cur == node) { last->next = cur->next; #ifdef USE_ASSERT_CHECKING found = true; #endif break; } last = cur; } Assert(found); slist_check(head); }