aboutsummaryrefslogtreecommitdiffstats
path: root/main/strcompat.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2011-01-10 22:40:23 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2011-01-10 22:40:23 +0000
commitbd4e992dd6747361032437c1dc5c0021ec6d4276 (patch)
treebeae2760d2cc523bb923ec2b17fdd6fdc4ce5b51 /main/strcompat.c
parent073525feb7e1f0d5b518d64eba8bfe55b0fab7d5 (diff)
Merged revisions 301263 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r301263 | tilghman | 2011-01-10 16:39:31 -0600 (Mon, 10 Jan 2011) | 8 lines Little endian machines were not converted properly. (closes issue #18583) Reported by: jcovert Patches: 20110110__issue18583.diff.txt uploaded by tilghman (license 14) Tested by: jcovert ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@301264 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/strcompat.c')
-rw-r--r--main/strcompat.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/main/strcompat.c b/main/strcompat.c
index e718cc628..97faae73f 100644
--- a/main/strcompat.c
+++ b/main/strcompat.c
@@ -367,14 +367,14 @@ uint64_t ntohll(uint64_t net64)
} number;
number.u = net64;
return
- (((uint64_t) number.c[0]) << 0) |
- (((uint64_t) number.c[1]) << 8) |
- (((uint64_t) number.c[2]) << 16) |
- (((uint64_t) number.c[3]) << 24) |
- (((uint64_t) number.c[4]) << 32) |
- (((uint64_t) number.c[5]) << 40) |
- (((uint64_t) number.c[6]) << 48) |
- (((uint64_t) number.c[7]) << 56);
+ (((uint64_t) number.c[0]) << 56) |
+ (((uint64_t) number.c[1]) << 48) |
+ (((uint64_t) number.c[2]) << 40) |
+ (((uint64_t) number.c[3]) << 32) |
+ (((uint64_t) number.c[4]) << 24) |
+ (((uint64_t) number.c[5]) << 16) |
+ (((uint64_t) number.c[6]) << 8) |
+ (((uint64_t) number.c[7]) << 0);
#else
#error "Unknown byte order"
#endif
@@ -393,14 +393,14 @@ uint64_t htonll(uint64_t host64)
} number;
number.u = host64;
return
- (((uint64_t) number.c[0]) << 0) |
- (((uint64_t) number.c[1]) << 8) |
- (((uint64_t) number.c[2]) << 16) |
- (((uint64_t) number.c[3]) << 24) |
- (((uint64_t) number.c[4]) << 32) |
- (((uint64_t) number.c[5]) << 40) |
- (((uint64_t) number.c[6]) << 48) |
- (((uint64_t) number.c[7]) << 56);
+ (((uint64_t) number.c[0]) << 56) |
+ (((uint64_t) number.c[1]) << 48) |
+ (((uint64_t) number.c[2]) << 40) |
+ (((uint64_t) number.c[3]) << 32) |
+ (((uint64_t) number.c[4]) << 24) |
+ (((uint64_t) number.c[5]) << 16) |
+ (((uint64_t) number.c[6]) << 8) |
+ (((uint64_t) number.c[7]) << 0);
#else
#error "Unknown byte order"
#endif