aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/utils.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2018-05-21 13:52:47 +0200
committerSverker Eriksson <[email protected]>2018-06-04 16:28:47 +0200
commit9611459cddf27fd648aad4d799ca1fc4cf92f351 (patch)
tree75805eb7ffaa30f6423c28d76d78e0ec3ae03f88 /erts/emulator/beam/utils.c
parent1c8365272a55301609dc8c46aa49fa0ac048506e (diff)
downloadotp-9611459cddf27fd648aad4d799ca1fc4cf92f351.tar.gz
otp-9611459cddf27fd648aad4d799ca1fc4cf92f351.tar.bz2
otp-9611459cddf27fd648aad4d799ca1fc4cf92f351.zip
erts: Refactor usage of am_atom_put to ERTS_MAKE_AM
and let compiler determine string lengths. These were actually wrong in erl_db.c: count_trap\0 replace_tra select_tra
Diffstat (limited to 'erts/emulator/beam/utils.c')
-rw-r--r--erts/emulator/beam/utils.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/erts/emulator/beam/utils.c b/erts/emulator/beam/utils.c
index d74052d8b2..87709edc15 100644
--- a/erts/emulator/beam/utils.c
+++ b/erts/emulator/beam/utils.c
@@ -1972,8 +1972,7 @@ static void do_send_logger_message(Eterm gl, Eterm tag, Eterm format, Eterm args
break;
}
- md = MAP2(hp, am_emulator, am_true,
- am_atom_put("tag", 3), el_tag);
+ md = MAP2(hp, am_emulator, am_true, ERTS_MAKE_AM("tag"), el_tag);
hp += MAP2_SZ;
if (is_nil(gl) && is_non_value(pid)) {
@@ -1994,14 +1993,14 @@ static void do_send_logger_message(Eterm gl, Eterm tag, Eterm format, Eterm args
/* no gl */
md = MAP3(hp,
am_error_logger, md,
- am_atom_put("gl", 2), gl,
+ ERTS_MAKE_AM("gl"), gl,
am_time, time);
hp += MAP3_SZ;
pid = NIL;
} else {
md = MAP4(hp,
am_error_logger, md,
- am_atom_put("gl", 2), gl,
+ ERTS_MAKE_AM("gl"), gl,
am_pid, pid,
am_time, time);
hp += MAP4_SZ;