summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-02-24 07:43:04 -0800
committerKaz Kylheku <kaz@kylheku.com>2019-02-24 07:43:04 -0800
commitd69b1f7012c0168910faa1e88a0e0c6b776ca094 (patch)
tree69fc9f97353ca6c7b8c432bcf2c544b06d2d5f18
parent8b03aa84e1a22252fd3b72c47aa890d50774c84c (diff)
downloadtxr-d69b1f7012c0168910faa1e88a0e0c6b776ca094.tar.gz
txr-d69b1f7012c0168910faa1e88a0e0c6b776ca094.tar.bz2
txr-d69b1f7012c0168910faa1e88a0e0c6b776ca094.zip
hash: remove redundant assignment from hash_grow.
* hash.c (hash_grow): The new_table value is stored in h->table twice. First directly and then via the set macro. Let's just use setcheck, which avoids the intermediate loc object.
-rw-r--r--hash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hash.c b/hash.c
index 3dde4dca..1667c741 100644
--- a/hash.c
+++ b/hash.c
@@ -609,7 +609,7 @@ static void hash_grow(struct hash *h, val hash)
h->modulus = new_modulus;
h->table = new_table;
- set(mkloc(h->table, hash), new_table);
+ setcheck(hash, new_table);
}
static val hash_assoc(val key, cnum hash, val list)