aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2018-11-01 11:15:29 +0100
committerRickard Green <[email protected]>2018-11-01 11:15:29 +0100
commitfd7be62b180cdb2517c363494cf49260e4a53afa (patch)
tree4a0a51871979e13a0078ac60d0459bb72fa8cbb2 /erts/emulator
parent3094642858ec071f9e98cfa666b82e06648b5266 (diff)
parent9a699277bdc8a422ddf5d3ace3cfe59d32f0ce10 (diff)
downloadotp-fd7be62b180cdb2517c363494cf49260e4a53afa.tar.gz
otp-fd7be62b180cdb2517c363494cf49260e4a53afa.tar.bz2
otp-fd7be62b180cdb2517c363494cf49260e4a53afa.zip
Merge branch 'rickard/internal_ref_cmp/OTP-15399/ERL-751' into maint
* rickard/internal_ref_cmp/OTP-15399/ERL-751: Fix erts_internal_ref_number_cmp()
Diffstat (limited to 'erts/emulator')
-rw-r--r--erts/emulator/beam/erl_bif_unique.h6
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 40b70667c0..944788c67c 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;
}