summaryrefslogtreecommitdiff
path: root/gdhcp
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@profusion.mobi>2012-04-20 16:02:47 (GMT)
committerMarcel Holtmann <marcel@holtmann.org>2012-04-20 16:07:31 (GMT)
commit20807db0f40b538e0b781a61a9a7d54d3a633a73 (patch)
tree726ead4ae74fd937a16d9feed35a9694da5fa47b /gdhcp
parente436352b08263869f29ca9283ab1bf95e5b14b03 (diff)
downloadconnman-20807db0f40b538e0b781a61a9a7d54d3a633a73.zip
connman-20807db0f40b538e0b781a61a9a7d54d3a633a73.tar.gz
connman-20807db0f40b538e0b781a61a9a7d54d3a633a73.tar.bz2
gdhcp: fix strict-aliasing warning
The previous way was giving the following warning with gcc 4.7: CC gdhcp/common.o gdhcp/common.c: In function 'dhcp_add_simple_option': gdhcp/common.c:275:38: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing Change it slightly so not to give this warning.
Diffstat (limited to 'gdhcp')
-rw-r--r--gdhcp/common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdhcp/common.c b/gdhcp/common.c
index 29b1f87..3c80edc 100644
--- a/gdhcp/common.c
+++ b/gdhcp/common.c
@@ -272,7 +272,7 @@ void dhcp_add_simple_option(struct dhcp_packet *packet, uint8_t code,
data <<= 8 * (4 - len);
#endif
- dhcp_put_unaligned(data, (uint32_t *) &option[OPT_DATA]);
+ dhcp_put_unaligned(data, (uint32_t *)(option + OPT_DATA));
dhcp_add_binary_option(packet, option);
return;