diff options
author | Richard Carlsson <[email protected]> | 2015-12-03 14:33:53 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2016-02-08 16:11:56 +0100 |
commit | 14680fcc3fb9d0357fe33a94525d08896afed1c5 (patch) | |
tree | 40b1891cdbe478154d62262616494dbc27eabcf1 /erts/emulator/beam/erl_utils.h | |
parent | acc4ac9f421e064bc0e573a9d5ecd26afe7cb8d6 (diff) | |
download | otp-14680fcc3fb9d0357fe33a94525d08896afed1c5.tar.gz otp-14680fcc3fb9d0357fe33a94525d08896afed1c5.tar.bz2 otp-14680fcc3fb9d0357fe33a94525d08896afed1c5.zip |
erts: Use Sint instead of int for list lengths
This avoids potential integer arithmetic overflow for very large lists.
Diffstat (limited to 'erts/emulator/beam/erl_utils.h')
-rw-r--r-- | erts/emulator/beam/erl_utils.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_utils.h b/erts/emulator/beam/erl_utils.h index 4058d63eaf..b86786a9c0 100644 --- a/erts/emulator/beam/erl_utils.h +++ b/erts/emulator/beam/erl_utils.h @@ -115,7 +115,7 @@ void erts_silence_warn_unused_result(long unused); int erts_fit_in_bits_int64(Sint64); int erts_fit_in_bits_int32(Sint32); int erts_fit_in_bits_uint(Uint); -int erts_list_length(Eterm); +Sint erts_list_length(Eterm); int erts_is_builtin(Eterm, Eterm, int); Uint32 make_broken_hash(Eterm); Uint32 block_hash(byte *, unsigned, Uint32); |