MCPcopy Create free account
hub / github.com/EIPStackGroup/OpENer / DoublyLinkedListDestroy

Function DoublyLinkedListDestroy

source/src/utils/doublylinkedlist.c:22–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20}
21
22void DoublyLinkedListDestroy(DoublyLinkedList *list) {
23 DoublyLinkedListNode *iterator = list->first;
24 while(NULL != iterator) {
25 DoublyLinkedListNode *to_delete = iterator;
26 iterator = iterator->next;
27 DoublyLinkedListNodeDestroy(list, &to_delete);
28 }
29
30 list->first = NULL;
31 list->last = NULL;
32 list->allocator = NULL;
33 list->deallocator = NULL;
34}
35
36DoublyLinkedListNode *DoublyLinkedListNodeCreate(
37 const void *const data,

Callers 1

TESTFunction · 0.85

Calls 1

Tested by 1

TESTFunction · 0.68