summaryrefslogtreecommitdiff
path: root/iscsiuio
diff options
context:
space:
mode:
authorLee Duncan <lduncan@suse.com>2020-06-03 08:36:45 -0700
committerLee Duncan <lduncan@suse.com>2020-06-03 08:36:45 -0700
commit10009f1c5fc01238be976867bc02be046325850b (patch)
treec229056737e97b9beeadfebfd45346911d3ddd4a /iscsiuio
parent8d96cc47381a840e5e03384e8077ad238fd1adc4 (diff)
downloadopen-iscsi-10009f1c5fc01238be976867bc02be046325850b.tar.gz
Fix a compiler complaint about writing one byte
When playing with IPv6 IP addresses, which are described in C using a union, and the gcc-10 compiler didn't like that we were not specifying which member of the union we wanted to address of, when in fact all members have the same address. The fix is to be more explicit.
Diffstat (limited to 'iscsiuio')
-rw-r--r--iscsiuio/src/uip/ipv6.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/iscsiuio/src/uip/ipv6.c b/iscsiuio/src/uip/ipv6.c
index 05efa73..11cb4e9 100644
--- a/iscsiuio/src/uip/ipv6.c
+++ b/iscsiuio/src/uip/ipv6.c
@@ -519,7 +519,7 @@ static void ipv6_insert_protocol_chksum(struct ipv6_hdr *ipv6)
* SRC IP, DST IP, Protocol Data Length, and Next Header.
*/
sum = 0;
- ptr = (u16_t *)&ipv6->ipv6_src;
+ ptr = (u16_t *)&ipv6->ipv6_src.addr16[0];
for (i = 0; i < sizeof(struct ipv6_addr); i++) {
sum += HOST_TO_NET16(*ptr);