From 068e3e6c5a74702c3e7db0e37b243f522c433a7f Mon Sep 17 00:00:00 2001 From: Gediminas Jakutis Date: Wed, 3 Mar 2021 14:57:28 +0200 Subject: straight up code refactor. Signed-off-by: Gediminas Jakutis --- src/mergesort.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/mergesort.c') diff --git a/src/mergesort.c b/src/mergesort.c index 883d8ba..1b21db7 100644 --- a/src/mergesort.c +++ b/src/mergesort.c @@ -49,16 +49,16 @@ static int merge(struct stream * const dest, struct stream * const A, struct str struct entry_l *a; struct entry_l *b; - a = get(A); - b = get(B); + a = A->get(A); + b = B->get(B); while (a || b) { if (a && (!b || a->val <= b->val)) { - put(dest, a); - a = get(A); + dest->put(dest, a); + a = A->get(A); } else { - put(dest, b); - b = get(B); + dest->put(dest, b); + b = B->get(B); } } -- cgit v1.2.3