From 153b8428b1b0095ca877573e2c310aa4e49ba0f2 Mon Sep 17 00:00:00 2001 From: sin Date: Tue, 16 Dec 2014 21:00:19 +0000 Subject: [PATCH] Nuke another freelist() --- TODO | 2 +- sort.c | 14 -------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/TODO b/TODO index af5cfec..658df7b 100644 --- a/TODO +++ b/TODO @@ -35,7 +35,7 @@ We also need to add support for UTF-8. We have imported libutf from suckless.org. As a first step we should rework existing tools that use wide characters to use the libutf library. -Update manpages to the new style. Look at cmp.1 or at the OpenBSD +Update manpages to the new style. Look at grep.1 or at the OpenBSD manpages for more information. [0] http://landley.net/toybox/roadmap.html diff --git a/sort.c b/sort.c index c4cd81f..d46a84b 100644 --- a/sort.c +++ b/sort.c @@ -33,7 +33,6 @@ static struct kdlist *tail = NULL; static void addkeydef(char *, int); static void check(FILE *); -static void freelist(void); static int linecmp(const char **, const char **); static char *skipblank(char *); static int parse_flags(char **, int *, int); @@ -124,7 +123,6 @@ main(int argc, char *argv[]) } } - freelist(); return 0; } @@ -165,18 +163,6 @@ check(FILE *fp) } } -static void -freelist(void) -{ - struct kdlist *node; - struct kdlist *tmp; - - for (node = head; node; node = tmp) { - tmp = node->next; - free(node); - } -} - static int linecmp(const char **a, const char **b) {