aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
diff options
context:
space:
mode:
authorHenrik Nord <[email protected]>2015-09-17 13:08:27 +0200
committerHenrik Nord <[email protected]>2015-09-17 13:08:27 +0200
commit906d515b76abd98b7c0db52db484d2d7a0ba70bf (patch)
tree77c0198c1c1005c80eb6b728eb1a6c751f7fad16 /erts/emulator
parent92566fedf24762545f4f7527b9306eb4fd4a9ff9 (diff)
parent6c9f25aafc8682387f13f6a6ac505ffaeff476c0 (diff)
downloadotp-906d515b76abd98b7c0db52db484d2d7a0ba70bf.tar.gz
otp-906d515b76abd98b7c0db52db484d2d7a0ba70bf.tar.bz2
otp-906d515b76abd98b7c0db52db484d2d7a0ba70bf.zip
Merge branch 'maint'
Diffstat (limited to 'erts/emulator')
-rw-r--r--erts/emulator/beam/big.c3
-rw-r--r--erts/emulator/beam/erl_nif_api_funcs.h2
-rw-r--r--erts/emulator/test/num_bif_SUITE.erl2
3 files changed, 5 insertions, 2 deletions
diff --git a/erts/emulator/beam/big.c b/erts/emulator/beam/big.c
index 8662398dcf..02d37e24df 100644
--- a/erts/emulator/beam/big.c
+++ b/erts/emulator/beam/big.c
@@ -2604,6 +2604,9 @@ Eterm erts_chars_to_integer(Process *BIF_P, char *bytes,
size--;
}
+ if (size == 0)
+ goto bytebuf_to_integer_1_error;
+
if (size < SMALL_DIGITS && base <= 10) {
/* *
* Take shortcut if we know that all chars are '0' < b < '9' and
diff --git a/erts/emulator/beam/erl_nif_api_funcs.h b/erts/emulator/beam/erl_nif_api_funcs.h
index f93152c921..2f2180e1aa 100644
--- a/erts/emulator/beam/erl_nif_api_funcs.h
+++ b/erts/emulator/beam/erl_nif_api_funcs.h
@@ -543,7 +543,7 @@ static ERL_NIF_INLINE ERL_NIF_TERM enif_make_list9(ErlNifEnv* env,
#ifndef enif_make_pid
-# define enif_make_pid(ENV, PID) ((const ERL_NIF_TERM)((PID)->pid))
+# define enif_make_pid(ENV, PID) ((void)(ENV),(const ERL_NIF_TERM)((PID)->pid))
#if SIZEOF_LONG == 8
# define enif_get_int64 enif_get_long
diff --git a/erts/emulator/test/num_bif_SUITE.erl b/erts/emulator/test/num_bif_SUITE.erl
index f07f79b83d..90b6a36262 100644
--- a/erts/emulator/test/num_bif_SUITE.erl
+++ b/erts/emulator/test/num_bif_SUITE.erl
@@ -429,7 +429,7 @@ t_string_to_integer(Config) when is_list(Config) ->
list_to_binary(Value))),
{'EXIT', {badarg, _}} =
(catch erlang:list_to_integer(Value))
- end,["1.0"," 1"," -1",""]),
+ end,["1.0"," 1"," -1","","+"]),
% Custom base error cases
lists:foreach(fun({Value,Base}) ->