diff options
author | Erlang/OTP <[email protected]> | 2018-10-31 17:14:04 +0100 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2018-10-31 17:14:04 +0100 |
commit | 2b71bf450fdc4dd0e892738b792d3fed860c0c89 (patch) | |
tree | 42a6ef69ec4a278d39ce17b0542c61377a4fb5ef /erts/emulator/beam | |
parent | 2e6b0b105b48e072d13672e0ca73107fc75cbcdc (diff) | |
parent | 9a699277bdc8a422ddf5d3ace3cfe59d32f0ce10 (diff) | |
download | otp-2b71bf450fdc4dd0e892738b792d3fed860c0c89.tar.gz otp-2b71bf450fdc4dd0e892738b792d3fed860c0c89.tar.bz2 otp-2b71bf450fdc4dd0e892738b792d3fed860c0c89.zip |
Merge branch 'rickard/internal_ref_cmp/OTP-15399/ERL-751' into maint-20
* rickard/internal_ref_cmp/OTP-15399/ERL-751:
Fix erts_internal_ref_number_cmp()
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r-- | erts/emulator/beam/erl_bif_unique.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/erts/emulator/beam/erl_bif_unique.h b/erts/emulator/beam/erl_bif_unique.h index 9aa631fde9..e3a633080d 100644 --- a/erts/emulator/beam/erl_bif_unique.h +++ b/erts/emulator/beam/erl_bif_unique.h @@ -242,11 +242,11 @@ erts_internal_ref_number_cmp(Uint32 num1[ERTS_REF_NUMBERS], Uint32 num2[ERTS_REF_NUMBERS]) { if (num1[2] != num2[2]) - return (int) ((Sint64) num1[2] - (Sint64) num2[2]); + return num1[2] > num2[2] ? 1 : -1; if (num1[1] != num2[1]) - return (int) ((Sint64) num1[1] - (Sint64) num2[1]); + return num1[1] > num2[1] ? 1 : -1; if (num1[0] != num2[0]) - return (int) ((Sint64) num1[0] - (Sint64) num2[0]); + return num1[0] > num2[0] ? 1 : -1; return 0; } |