From 9e2b6db36ab6486172fccd0e1786532826d58c53 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 15 Jul 2012 17:22:04 -0500 Subject: Genericize llist code a bit: rename llist_free() to llist_traverse(), and no longer accept NULL as a synonym for free. --- toys/patch.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'toys/patch.c') diff --git a/toys/patch.c b/toys/patch.c index 95702ae6..647bb18f 100644 --- a/toys/patch.c +++ b/toys/patch.c @@ -108,7 +108,7 @@ static void fail_hunk(void) // this file and advance to next file. TT.state = 2; - llist_free(TT.current_hunk, do_line); + llist_traverse(TT.current_hunk, do_line); TT.current_hunk = NULL; delete_tempfile(TT.filein, TT.fileout, &TT.tempname); TT.state = 0; @@ -221,13 +221,13 @@ static int apply_one_hunk(void) out: // We have a match. Emit changed data. TT.state = "-+"[reverse]; - llist_free(TT.current_hunk, do_line); + llist_traverse(TT.current_hunk, do_line); TT.current_hunk = NULL; TT.state = 1; done: if (buf) { buf->prev->next = NULL; - llist_free(buf, do_line); + llist_traverse(buf, do_line); } return TT.state; -- cgit v1.2.3