aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/hash.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2018-03-15 17:21:04 +0100
committerSverker Eriksson <[email protected]>2018-03-20 15:33:45 +0100
commit836b90884f9abff3a82b2cee8bada16b23f7ddf7 (patch)
tree590a433658f93ff135b90d6abda60eb791307585 /erts/emulator/beam/hash.c
parentd171399bb5a0e9f4c6029564ece4fbf89f3c76f8 (diff)
downloadotp-836b90884f9abff3a82b2cee8bada16b23f7ddf7.tar.gz
otp-836b90884f9abff3a82b2cee8bada16b23f7ddf7.tar.bz2
otp-836b90884f9abff3a82b2cee8bada16b23f7ddf7.zip
erts: Make sys_memcpy and friends inline functions
to avoid argument-evaluated-twice bugs like in macro DMC_PUSH. Had to shuffle around some #include and #define to make erl_child_setup build debug target.
Diffstat (limited to 'erts/emulator/beam/hash.c')
-rw-r--r--erts/emulator/beam/hash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/erts/emulator/beam/hash.c b/erts/emulator/beam/hash.c
index 8548e30e8b..6a31489473 100644
--- a/erts/emulator/beam/hash.c
+++ b/erts/emulator/beam/hash.c
@@ -152,7 +152,7 @@ Hash* hash_init(int type, Hash* h, char* name, int size, HashFunctions fun)
h->bucket = (HashBucket**) fun.meta_alloc(h->meta_alloc_type, sz);
- sys_memzero(h->bucket, sz);
+ memzero(h->bucket, sz);
h->is_allocated = 0;
h->name = name;
h->fun = fun;
@@ -224,7 +224,7 @@ static void rehash(Hash* h, int grow)
sz = h->size*sizeof(HashBucket*);
new_bucket = (HashBucket **) h->fun.meta_alloc(h->meta_alloc_type, sz);
- sys_memzero(new_bucket, sz);
+ memzero(new_bucket, sz);
for (i = 0; i < old_size; i++) {
HashBucket* b = h->bucket[i];