Skip to content

Commit

Permalink
cutil: Remove unused code using memfree
Browse files Browse the repository at this point in the history
The case (destructor == NULL) never occurs in the current code.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed May 1, 2017
1 parent 80fdb63 commit ca89a11
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions cutil/oldlist.cpp
Expand Up @@ -87,8 +87,6 @@
#include <stdio.h>
#if MAC_OR_DOS
#include <stdlib.h>
#else
#include "freelist.h"
#endif

/*----------------------------------------------------------------------
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit ca89a11

Please sign in to comment.