From d7169ee7ffd45318125dbe3013aadbd1482a3e5f Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Fri, 29 Jun 2018 19:44:54 +1000 Subject: Replace list_empty with a simple alternative --- common/list.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'common') diff --git a/common/list.c b/common/list.c index cab10c1e..39cc10e1 100644 --- a/common/list.c +++ b/common/list.c @@ -62,13 +62,6 @@ void list_cat(list_t *list, list_t *source) { } } -void list_empty(list_t *list) { - list->capacity = 10; - list->length = 0; - free(list->items); - list->items = malloc(sizeof(void*) * list->capacity); -} - void list_qsort(list_t *list, int compare(const void *left, const void *right)) { qsort(list->items, list->length, sizeof(void *), compare); } -- cgit v1.2.3