diff options
| author | Alexander Egorenkov <Alexander.Egorenkov@ibm.com> | 2020-06-02 09:28:11 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2020-06-23 16:18:44 +0200 |
| commit | e5d10a43278b10875ef0a80be4af2d1b5692c1c9 (patch) | |
| tree | 5d573de44c3c373721e7f36c12170a44109f20f6 /executor/test.h | |
| parent | 54566aff1679fc74487d3efb9f7bbfbc21beed4b (diff) | |
ipc: fix endianness issues
Use native byte-order for IPC and program serialization.
This way we will be able to support both little- and big-endian
architectures.
Signed-off-by: Alexander Egorenkov <Alexander.Egorenkov@ibm.com>
Diffstat (limited to 'executor/test.h')
| -rw-r--r-- | executor/test.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/executor/test.h b/executor/test.h index 1f940eb71..0d3587b84 100644 --- a/executor/test.h +++ b/executor/test.h @@ -8,7 +8,7 @@ static int test_copyin() { static uint16 buf[3]; - STORE_BY_BITMASK(uint16, , &buf[1], 0x1234, 0, 16); + STORE_BY_BITMASK(uint16, htole16, &buf[1], 0x1234, 0, 16); unsigned char x[sizeof(buf)]; memcpy(x, buf, sizeof(x)); if (x[0] != 0 || x[1] != 0 || @@ -18,7 +18,7 @@ static int test_copyin() x[0], x[1], x[2], x[3], x[4], x[5]); return 1; } - STORE_BY_BITMASK(uint16, , &buf[1], 0x555a, 5, 4); + STORE_BY_BITMASK(uint16, htole16, &buf[1], 0x555a, 5, 4); memcpy(x, buf, sizeof(x)); if (x[0] != 0 || x[1] != 0 || x[2] != 0x54 || x[3] != 0x13 || |
