Commit Graph

16 Commits

Author SHA1 Message Date
[anp/hsw]
419745652b fix compiler warnings: -Wparentheses 2024-08-20 20:39:17 +03:00
bol-van
ddc3fe7481 ip2net: use restrict pointers in ip6_and 2024-08-02 15:27:24 +03:00
bol-van
3e8d7676fc function without args () -> (void) 2023-10-13 20:10:46 +03:00
bol-van
fa236ecc2c ip2net: fix ipv4 mask for /0 2022-12-12 21:51:04 +03:00
bol-van
04995b73de ip2net: fix build in mingw in *nix 2022-06-17 14:37:12 +03:00
bol-van
a813570415 ip2net: mingw compile 2022-06-17 14:05:58 +03:00
bol-van
c2754cc347 ip2net: fix comparision 2022-06-17 10:39:09 +03:00
bol-van
76ae74eedd ip2net: some more optimize ipv6 sort 2022-06-17 10:35:20 +03:00
bol-van
9cf2e3f1de ip2net: optimize ipv6 sort for all endianness 2022-06-16 19:45:01 +03:00
bol-van
9529953594 ip2net: improve performance on big endian systems 2022-06-16 15:43:20 +03:00
bol-van
3842cbbca5 ip2net: i hate strict aliasing 2022-06-13 17:51:07 +03:00
Jonathan Wakely
6adaf5ca27
Fix aliasing violations in ip6_and
Accessing uint8_t[16] through a different type is an aliasing violation, i.e. undefined behaviour.

Use memcpy to copy the bytes out, then AND them, then memcpy back in.
The actual memcpy calls will be optimized away, but doing it this way avoids undefined behaviour.
2022-06-08 16:29:44 +01:00
bol-van
2a3b9cf982 test for -1 (EOF) sscanf result 2021-12-27 12:54:07 +03:00
bol-van
0b8072840b ip2net : precompute ipv6 masks 2021-09-18 21:22:29 +03:00
bol-van
9402cd2cf0 ip2net : zero less significant bits in ip4/ip6 addresses, workaround GCC bug 2021-09-12 13:58:13 +03:00
bol-van
3703918a4b history purge 2021-03-04 14:30:38 +03:00