MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / DestroyList

Function DestroyList

Descent3/list.cpp:114–121  ·  view source on GitHub ↗

Destroys all the nodes in a list The items must be freed in another routine

Source from the content-addressed store, hash-verified

112// Destroys all the nodes in a list
113// The items must be freed in another routine
114void DestroyList(listnode **listp) {
115 listnode *node, *next;
116
117 for (node = *listp; node != NULL; node = next) {
118 next = node->next;
119 mem_free(node);
120 }
121}
122
123// Returns the number of items in a list
124int CountListItems(listnode **listp) {

Callers 4

BuildBSPNodeFunction · 0.85
DestroyBSPNodeFunction · 0.85
BuildBSPTreeFunction · 0.85
BuildSingleBSPTreeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected