Destroys all the nodes in a list The items must be freed in another routine
| 112 | // Destroys all the nodes in a list |
| 113 | // The items must be freed in another routine |
| 114 | void 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 |
| 124 | int CountListItems(listnode **listp) { |
no outgoing calls
no test coverage detected