summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-10-21 12:04:59 +0200
committerVolker Lendecke <vlendec@samba.org>2011-10-27 20:28:31 +0200
commit4b9cc8f8f9e108606fcbd78cc2226018cf622088 (patch)
tree2df59abab3ca7a5ab6cb276d272609d72f58b3bf /source3/lib
parenta0f7c990f40796a71219a2c3f3d1077b90aae3c9 (diff)
downloadsamba-4b9cc8f8f9e108606fcbd78cc2226018cf622088.tar.gz
samba-4b9cc8f8f9e108606fcbd78cc2226018cf622088.tar.bz2
samba-4b9cc8f8f9e108606fcbd78cc2226018cf622088.zip
s3: Fix some type-punned warnings
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/ctdbd_conn.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c
index 21a417c00d..6e6c466128 100644
--- a/source3/lib/ctdbd_conn.c
+++ b/source3/lib/ctdbd_conn.c
@@ -1359,15 +1359,15 @@ NTSTATUS ctdbd_register_ips(struct ctdbd_connection *conn,
switch (client.ss_family) {
case AF_INET:
- p4.dest = *(struct sockaddr_in *)(void *)&server;
- p4.src = *(struct sockaddr_in *)(void *)&client;
+ memcpy(&p4.dest, &server, sizeof(p4.dest));
+ memcpy(&p4.src, &client, sizeof(p4.src));
data.dptr = (uint8_t *)&p4;
data.dsize = sizeof(p4);
break;
#ifdef HAVE_STRUCT_CTDB_CONTROL_TCP_ADDR
case AF_INET6:
- p.dest.ip6 = *(struct sockaddr_in6 *)(void *)&server;
- p.src.ip6 = *(struct sockaddr_in6 *)(void *)&client;
+ memcpy(&p.dest.ip6, &server, sizeof(p.dest.ip6));
+ memcpy(&p.src.ip6, &client, sizeof(p.src.ip6));
data.dptr = (uint8_t *)&p;
data.dsize = sizeof(p);
break;