Commit fdbb40fdd8b3a7337b9a354ca59039b19a50328a

Patrick Steinhardt 2017-07-21T11:26:13

tsort: remove idempotent conditional assignment The conditional `run < minrun` can never be true directly after assigning `run = minrun`. Remove it to avoid confusion.

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/src/tsort.c b/src/tsort.c
index e598192..8d1ed97 100644
--- a/src/tsort.c
+++ b/src/tsort.c
@@ -310,7 +310,6 @@ static ssize_t collapse(void **dst, struct tsort_run *stack, ssize_t stack_curr,
 #define PUSH_NEXT() do {\
 	len = count_run(dst, curr, size, store);\
 	run = minrun;\
-	if (run < minrun) run = minrun;\
 	if (run > (ssize_t)size - curr) run = size - curr;\
 	if (run > len) {\
 		bisort(&dst[curr], len, run, cmp, payload);\