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*.
This commit is contained in:
Tobias Brunner 2017-09-14 19:33:07 +02:00
parent 787cc3a4e5
commit e433d512f4
1 changed files with 1 additions and 1 deletions

View File

@ -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];