diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-02-24 07:43:04 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-02-24 07:43:04 -0800 |
commit | 2445c978fc682de3bca5451d230e76cdc1a2ab2d (patch) | |
tree | 69fc9f97353ca6c7b8c432bcf2c544b06d2d5f18 /hash.c | |
parent | 6fd4ad522c16e95170300fe7481553f5a8704b78 (diff) | |
download | txr-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) |