]> git.ipfire.org Git - thirdparty/haproxy.git/commit
CLEANUP: sample: use read_u64() in ipmask() to apply an IPv6 mask
authorWilly Tarreau <w@1wt.eu>
Tue, 25 Feb 2020 08:43:22 +0000 (09:43 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 25 Feb 2020 09:24:14 +0000 (10:24 +0100)
commita8b7ecd4dcb2b11d418ff57484c41ae62d1766ce
tree5411be73c06df2ca38e4f057728872eb246d5976
parent6cde5d883c03955efd65acfb5b718bd8a63e4c89
CLEANUP: sample: use read_u64() in ipmask() to apply an IPv6 mask

There were 8 strict aliasing warnings there due to the dereferences
casting to uint32_t of input and output. We can achieve the same using
two write_u64() and four read_u64() which do not cause this issue and
even let the compiler use 64-bit operations.
src/sample.c