Skip to content

Commit ca89a11

Browse files
committed
cutil: Remove unused code using memfree
The case (destructor == NULL) never occurs in the current code. Signed-off-by: Stefan Weil <sw@weilnetz.de>
1 parent 80fdb63 commit ca89a11

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

cutil/oldlist.cpp

+1-4
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@
8787
#include <stdio.h>
8888
#if MAC_OR_DOS
8989
#include <stdlib.h>
90-
#else
91-
#include "freelist.h"
9290
#endif
9391

9492
/*----------------------------------------------------------------------
@@ -202,8 +200,7 @@ LIST destroy(LIST list) {
202200
* Return the space taken by the LISTs of a list to the heap.
203201
**********************************************************************/
204202
void destroy_nodes(LIST list, void_dest destructor) {
205-
if (destructor == NULL)
206-
destructor = memfree;
203+
ASSERT_HOST(destructor != NULL);
207204

208205
while (list != NIL_LIST) {
209206
if (first_node(list) != NULL) (*destructor)(first_node(list));

0 commit comments

Comments
 (0)