aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2017-09-14 19:33:07 +0200
committerTobias Brunner <tobias@strongswan.org>2017-09-18 12:16:54 +0200
commite433d512f4b184d3591bd78be6d74b55a84d5d03 (patch)
tree79ae1904727dca4c93c53fb22026823723decc82 /src
parent787cc3a4e59726e68765dbeb6a3f282c7b00f463 (diff)
downloadstrongswan-e433d512f4b184d3591bd78be6d74b55a84d5d03.tar.bz2
strongswan-e433d512f4b184d3591bd78be6d74b55a84d5d03.tar.xz
dhcp: Fix warning regarding unaligned pointer value due to packed struct
We don't need to access this as uint32_t so just cast it to a char*.
Diffstat (limited to 'src')
-rw-r--r--src/libcharon/plugins/dhcp/dhcp_socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcharon/plugins/dhcp/dhcp_socket.c b/src/libcharon/plugins/dhcp/dhcp_socket.c
index 4f4e1ffe0..7541c3b49 100644
--- a/src/libcharon/plugins/dhcp/dhcp_socket.c
+++ b/src/libcharon/plugins/dhcp/dhcp_socket.c
@@ -438,7 +438,7 @@ METHOD(dhcp_socket_t, release, void,
DBG1(DBG_CFG, "sending DHCP RELEASE for %H to %H", release, server);
chunk = release->get_address(release);
- memcpy(&dhcp.client_address, chunk.ptr,
+ memcpy((char*)&dhcp.client_address, chunk.ptr,
min(chunk.len, sizeof(dhcp.client_address)));
option = (dhcp_option_t*)&dhcp.options[optlen];