aboutsummaryrefslogtreecommitdiff
path: root/toys/patch.c
diff options
context:
space:
mode:
Diffstat (limited to 'toys/patch.c')
-rw-r--r--toys/patch.c6
1 files changed, 3 insertions, 3 deletions
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;