summaryrefslogtreecommitdiffstats
path: root/combi.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-02-18 07:19:11 -0800
committerKaz Kylheku <kaz@kylheku.com>2014-02-18 07:19:11 -0800
commit9f986ceb512c1e9ac0494c546e2618199396f82f (patch)
tree6604a27db5c3df6cb9309fee6ae8961aa8bcf1db /combi.c
parentccede3ad2a306c68861e8483a647e78f7ee54fbe (diff)
downloadtxr-9f986ceb512c1e9ac0494c546e2618199396f82f.tar.gz
txr-9f986ceb512c1e9ac0494c546e2618199396f82f.tar.bz2
txr-9f986ceb512c1e9ac0494c546e2618199396f82f.zip
* combi.c (rperm_gen_full): Update ptail with return value
of list_collect. This is not necessary for correctness, but it spares list_collect from having to search for the tail on each call.
Diffstat (limited to 'combi.c')
-rw-r--r--combi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/combi.c b/combi.c
index e32957a4..68664b5c 100644
--- a/combi.c
+++ b/combi.c
@@ -244,7 +244,7 @@ static val rperm_gen_fun(val env)
cnum len = c_num(length_vec(vec));
for (i = 0; i < len; i++)
- list_collect(ptail, car(vec->v.vec[i]));
+ ptail = list_collect(ptail, car(vec->v.vec[i]));
for (i = len-1; i >= 0; i--) {
pop(&vec->v.vec[i]);