aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_bif_unique.h
diff options
context:
space:
mode:
Diffstat (limited to 'erts/emulator/beam/erl_bif_unique.h')
-rw-r--r--erts/emulator/beam/erl_bif_unique.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/erts/emulator/beam/erl_bif_unique.h b/erts/emulator/beam/erl_bif_unique.h
index 9aa631fde9..944788c67c 100644
--- a/erts/emulator/beam/erl_bif_unique.h
+++ b/erts/emulator/beam/erl_bif_unique.h
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2014-2017. All Rights Reserved.
+ * Copyright Ericsson AB 2014-2018. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -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;
}
@@ -307,7 +307,7 @@ erts_iref_storage_clean(ErtsIRefStorage *iref)
if (iref->is_magic && erts_refc_dectest(&iref->u.mb->intern.refc, 0) == 0)
erts_ref_bin_free(iref->u.mb);
#ifdef DEBUG
- memset((void *) iref, 0xf, sizeof(ErtsIRefStorage));
+ sys_memset((void *) iref, 0xf, sizeof(ErtsIRefStorage));
#endif
}
@@ -342,7 +342,7 @@ erts_iref_storage_make_ref(ErtsIRefStorage *iref,
#ifdef DEBUG
if (clean_storage)
- memset((void *) iref, 0xf, sizeof(ErtsIRefStorage));
+ sys_memset((void *) iref, 0xf, sizeof(ErtsIRefStorage));
#endif
return make_internal_ref(hp);