aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2010-05-19 15:21:15 +0200
committerRaimo Niskanen <[email protected]>2010-05-20 15:48:17 +0200
commit80b231a0874aa5cd68c3d9f0dc7e13b6736a5dd3 (patch)
tree51ffc9a8576eb31a1e8e07d873684aa82c6de6f4 /erts
parentc0895d14994c5e98b1171b0174c70a0244d52f86 (diff)
downloadotp-80b231a0874aa5cd68c3d9f0dc7e13b6736a5dd3.tar.gz
otp-80b231a0874aa5cd68c3d9f0dc7e13b6736a5dd3.tar.bz2
otp-80b231a0874aa5cd68c3d9f0dc7e13b6736a5dd3.zip
sys.h: Correct the get_int64() macro
The get_int64() macro has never been used (it was probably added for completeness at the same time that put_int64() was added), but it was not actually used and therefore it does not actually work.
Diffstat (limited to 'erts')
-rw-r--r--erts/emulator/beam/sys.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/erts/emulator/beam/sys.h b/erts/emulator/beam/sys.h
index a1955235b7..0f20d36167 100644
--- a/erts/emulator/beam/sys.h
+++ b/erts/emulator/beam/sys.h
@@ -1173,14 +1173,14 @@ EXTERN_FUNCTION(void*, sys_calloc2, (Uint, Uint));
/* Standard set of integer macros .. */
-#define get_int64(s) ((((unsigned char*) (s))[0] << 56) | \
- (((unsigned char*) (s))[1] << 48) | \
- (((unsigned char*) (s))[2] << 40) | \
- (((unsigned char*) (s))[3] << 32) | \
- (((unsigned char*) (s))[4] << 24) | \
- (((unsigned char*) (s))[5] << 16) | \
- (((unsigned char*) (s))[6] << 8) | \
- (((unsigned char*) (s))[7]))
+#define get_int64(s) (((Uint64)(((unsigned char*) (s))[0]) << 56) | \
+ (((Uint64)((unsigned char*) (s))[1]) << 48) | \
+ (((Uint64)((unsigned char*) (s))[2]) << 40) | \
+ (((Uint64)((unsigned char*) (s))[3]) << 32) | \
+ (((Uint64)((unsigned char*) (s))[4]) << 24) | \
+ (((Uint64)((unsigned char*) (s))[5]) << 16) | \
+ (((Uint64)((unsigned char*) (s))[6]) << 8) | \
+ (((Uint64)((unsigned char*) (s))[7])))
#define put_int64(i, s) do {((char*)(s))[0] = (char)((Sint64)(i) >> 56) & 0xff;\
((char*)(s))[1] = (char)((Sint64)(i) >> 48) & 0xff;\