cutil: Remove unused code using memfree

The case (destructor == NULL) never occurs in the current code.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2017-05-01 17:45:49 +02:00
parent 80fdb634ba
commit ca89a11f28

View File

@ -87,8 +87,6 @@
#include <stdio.h>
#if MAC_OR_DOS
#include <stdlib.h>
#else
#include "freelist.h"
#endif
/*----------------------------------------------------------------------
@ -202,8 +200,7 @@ LIST destroy(LIST list) {
* Return the space taken by the LISTs of a list to the heap.
**********************************************************************/
void destroy_nodes(LIST list, void_dest destructor) {
if (destructor == NULL)
destructor = memfree;
ASSERT_HOST(destructor != NULL);
while (list != NIL_LIST) {
if (first_node(list) != NULL) (*destructor)(first_node(list));