aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorHenrik Nord <[email protected]>2015-05-26 10:52:37 +0200
committerHenrik Nord <[email protected]>2015-05-26 10:52:40 +0200
commit032f106a1ebdbf310dd430b2169f55967e1d1a92 (patch)
tree7f94502631bfe9b460515b43a683545bd35ea828 /erts
parent2d8a73e2099f239e75276680cda9914c852316ee (diff)
parentcce681109c05ffa8cb88e83eb70ccf73c13d0c75 (diff)
downloadotp-032f106a1ebdbf310dd430b2169f55967e1d1a92.tar.gz
otp-032f106a1ebdbf310dd430b2169f55967e1d1a92.tar.bz2
otp-032f106a1ebdbf310dd430b2169f55967e1d1a92.zip
Merge branch 'jlouis/cocci-noderef-fixes'
* jlouis/cocci-noderef-fixes: Correct usage of sizeof() for pointer types OTP-12771
Diffstat (limited to 'erts')
-rw-r--r--erts/emulator/beam/erl_node_tables.c4
-rw-r--r--erts/etc/ose/run_erl.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/erts/emulator/beam/erl_node_tables.c b/erts/emulator/beam/erl_node_tables.c
index bcf6311079..6d827c6bda 100644
--- a/erts/emulator/beam/erl_node_tables.c
+++ b/erts/emulator/beam/erl_node_tables.c
@@ -705,7 +705,7 @@ erts_set_this_node(Eterm sysname, Uint creation)
erts_this_node->sysname = sysname;
erts_this_node->creation = creation;
erts_this_node_sysname = erts_this_node_sysname_BUFFER;
- erts_snprintf(erts_this_node_sysname, sizeof(erts_this_node_sysname),
+ erts_snprintf(erts_this_node_sysname, sizeof(erts_this_node_sysname_BUFFER),
"%T", sysname);
(void) hash_put(&erts_node_table, (void *) erts_this_node);
@@ -794,7 +794,7 @@ void erts_init_node_tables(void)
erts_this_node->creation = 0;
erts_this_node->dist_entry = erts_this_dist_entry;
erts_this_node_sysname = erts_this_node_sysname_BUFFER;
- erts_snprintf(erts_this_node_sysname, sizeof(erts_this_node_sysname),
+ erts_snprintf(erts_this_node_sysname, sizeof(erts_this_node_sysname_BUFFER),
"%T", erts_this_node->sysname);
(void) hash_put(&erts_node_table, (void *) erts_this_node);
diff --git a/erts/etc/ose/run_erl.c b/erts/etc/ose/run_erl.c
index 8bc49a485e..a6499f2bf3 100644
--- a/erts/etc/ose/run_erl.c
+++ b/erts/etc/ose/run_erl.c
@@ -615,7 +615,7 @@ int run_erl(int argc,char **argv) {
returns */
PROCESS main_pid;
hunt_in_block("run_erl","main",&main_pid);
- sig = alloc(sizeof(sig),ERTS_SIGNAL_RUN_ERL_DAEMON);
+ sig = alloc(sizeof(*sig),ERTS_SIGNAL_RUN_ERL_DAEMON);
send(&sig,main_pid);
sig = receive(sigsel);
pid = sender(&sig);