summaryrefslogtreecommitdiff
path: root/ctdb/tests
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2016-01-15 12:24:04 +1100
committerVolker Lendecke <vl@samba.org>2016-01-18 14:32:05 +0100
commitd51a63554f5cf385af5b6e4d7aa1fc64dde3641f (patch)
tree94581fd5cefbf32698e3a0ff8e58352830691f8e /ctdb/tests
parent594778e580474d48b954866da06cc2d505f1d1ef (diff)
downloadsamba-d51a63554f5cf385af5b6e4d7aa1fc64dde3641f.tar.gz
ctdb-build: Fix -O3 developer build
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Jan 18 14:32:05 CET 2016 on sn-devel-144
Diffstat (limited to 'ctdb/tests')
-rw-r--r--ctdb/tests/src/pkt_read_test.c2
-rw-r--r--ctdb/tests/src/pkt_write_test.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/ctdb/tests/src/pkt_read_test.c b/ctdb/tests/src/pkt_read_test.c
index 6dfd5a04549..7e089ec2541 100644
--- a/ctdb/tests/src/pkt_read_test.c
+++ b/ctdb/tests/src/pkt_read_test.c
@@ -39,7 +39,7 @@ static void writer(int fd)
for (i=0; i<1000; i++) {
for (j=0; j<4; j++) {
buflen = pkt_size[j];
- *(uint32_t *)buf = buflen;
+ memcpy(buf, &buflen, sizeof(buflen));
ret = write(fd, buf, buflen);
if (ret < 0) {
diff --git a/ctdb/tests/src/pkt_write_test.c b/ctdb/tests/src/pkt_write_test.c
index 0a5c6540671..191e8b3e894 100644
--- a/ctdb/tests/src/pkt_write_test.c
+++ b/ctdb/tests/src/pkt_write_test.c
@@ -157,7 +157,7 @@ static void writer(int fd)
for (i=0; i<4; i++) {
buflen = pkt_size[i];
- *(uint32_t *)buf = buflen;
+ memcpy(buf, &buflen, sizeof(buflen));
req = writer_send(mem_ctx, ev, fd, buf, buflen);
assert(req != NULL);