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:
parent
787cc3a4e5
commit
e433d512f4
|
@ -438,7 +438,7 @@ METHOD(dhcp_socket_t, release, void,
|
||||||
DBG1(DBG_CFG, "sending DHCP RELEASE for %H to %H", release, server);
|
DBG1(DBG_CFG, "sending DHCP RELEASE for %H to %H", release, server);
|
||||||
|
|
||||||
chunk = release->get_address(release);
|
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)));
|
min(chunk.len, sizeof(dhcp.client_address)));
|
||||||
|
|
||||||
option = (dhcp_option_t*)&dhcp.options[optlen];
|
option = (dhcp_option_t*)&dhcp.options[optlen];
|
||||||
|
|
Loading…
Reference in New Issue