summaryrefslogtreecommitdiffstats
path: root/hash.c
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
commit2445c978fc682de3bca5451d230e76cdc1a2ab2d (patch)
tree69fc9f97353ca6c7b8c432bcf2c544b06d2d5f18 /hash.c
parent6fd4ad522c16e95170300fe7481553f5a8704b78 (diff)
downloadtxr-2445c978fc682de3bca5451d230e76cdc1a2ab2d.tar.gz
txr-2445c978fc682de3bca5451d230e76cdc1a2ab2d.tar.bz2
txr-2445c978fc682de3bca5451d230e76cdc1a2ab2d.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.
Diffstat (limited to 'hash.c')
-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)