summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-06-11 19:25:34 -0700
committerKaz Kylheku <kaz@kylheku.com>2019-06-11 19:25:34 -0700
commitc7925b143b73813f3d88fe67b51ec807e7c2c0ad (patch)
tree6760688f51452ed2d3ce18a3178119d350544def
parent8d661219c56f4eb2abeb958e96d7699c82b666cb (diff)
downloadtxr-c7925b143b73813f3d88fe67b51ec807e7c2c0ad.tar.gz
txr-c7925b143b73813f3d88fe67b51ec807e7c2c0ad.tar.bz2
txr-c7925b143b73813f3d88fe67b51ec807e7c2c0ad.zip
hash: remove unnecessary test.
* hash.c (hash_next): We know after the loop that hi->cons is not nil, because the loop contains no break, and is guarded by hi->cons being nil.
-rw-r--r--hash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hash.c b/hash.c
index 857cd3c4..fcabb5bd 100644
--- a/hash.c
+++ b/hash.c
@@ -970,7 +970,7 @@ val hash_next(val iter)
}
set(mkloc(hi->cons, iter), vecref(h->table, num_fast(hi->chain)));
}
- return if2(hi->cons, us_car(hi->cons));
+ return us_car(hi->cons);
}
val maphash(val fun, val hash)