diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-03-05 01:58:35 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:49:14 -0500 |
commit | ae49e533ab7b9fd1bc52a3399ec4319af464f1f8 (patch) | |
tree | 9b76b1b0558d31a5b716d1793bece99c7696e587 | |
parent | 1d75e907e28fa0ee21c4693cbac9e0cdfb11c111 (diff) | |
download | samba-ae49e533ab7b9fd1bc52a3399ec4319af464f1f8.tar.gz samba-ae49e533ab7b9fd1bc52a3399ec4319af464f1f8.tar.bz2 samba-ae49e533ab7b9fd1bc52a3399ec4319af464f1f8.zip |
r21695: Fix on bigendian systems.
(This used to be commit 98f92dd6a1e7f096b328d80c5efdc6600a5de007)
-rw-r--r-- | source4/lib/tdr/testsuite.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/lib/tdr/testsuite.c b/source4/lib/tdr/testsuite.c index 0437fd9504..c87143b917 100644 --- a/source4/lib/tdr/testsuite.c +++ b/source4/lib/tdr/testsuite.c @@ -64,10 +64,10 @@ static bool test_push_uint16(struct torture_context *tctx) static bool test_pull_uint16(struct torture_context *tctx) { - uint16_t d = 782; + uint8_t d[2] = { 782 & 0xFF, (782 & 0xFF00) / 0x100 }; uint16_t l; struct tdr_pull tdr; - tdr.data.data = (uint8_t *)&d; + tdr.data.data = d; tdr.data.length = 2; tdr.offset = 0; tdr.flags = 0; @@ -95,10 +95,10 @@ static bool test_push_uint32(struct torture_context *tctx) static bool test_pull_uint32(struct torture_context *tctx) { - uint32_t d = 782; + uint8_t d[4] = { 782 & 0xFF, (782 & 0xFF00) / 0x100, 0, 0 }; uint32_t l; struct tdr_pull tdr; - tdr.data.data = (uint8_t *)&d; + tdr.data.data = d; tdr.data.length = 4; tdr.offset = 0; tdr.flags = 0; |