From 7e8f512b93718083a6cb58527b0b51f4f70bc353 Mon Sep 17 00:00:00 2001 From: Bobby Bingham Date: Thu, 31 Jul 2014 21:55:25 -0500 Subject: Reformat --- grailsort.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/grailsort.c b/grailsort.c index 8d69b97..379e23a 100644 --- a/grailsort.c +++ b/grailsort.c @@ -25,16 +25,9 @@ size_t merge(char *buf, char *base, size_t anmel, size_t bnmel, size_t width, cm swap(base, a, anmel * width); - while (anmel > 0 && bnmel > 0) { - if (cmp(a, b) <= 0) { - swap(base, a, width); - a += width; - anmel--; - } else { - swap(base, b, width); - b += width; - bnmel--; - } + while (anmel && bnmel) { + if (cmp(a, b) <= 0) { swap(base, a, width); a += width; anmel--; } + else { swap(base, b, width); b += width; bnmel--; } base += width; } -- cgit v1.2.3