ip2net: use restrict pointers in ip6_and

This commit is contained in:
bol-van 2024-08-02 15:27:24 +03:00
parent 9cf72b7c68
commit ddc3fe7481

View File

@ -178,7 +178,7 @@ static void ip6_and(const struct in6_addr *a, const struct in6_addr *b, struct i
#if defined(__GNUC__) && !defined(__llvm__) #if defined(__GNUC__) && !defined(__llvm__)
__attribute__((optimize ("no-strict-aliasing"))) __attribute__((optimize ("no-strict-aliasing")))
#endif #endif
static void ip6_and(const struct in6_addr *a, const struct in6_addr *b, struct in6_addr *result) static void ip6_and(const struct in6_addr * restrict a, const struct in6_addr * restrict b, struct in6_addr * restrict result)
{ {
#ifdef __SIZEOF_INT128__ #ifdef __SIZEOF_INT128__
// gcc and clang have 128 bit int types on some 64-bit archs. take some advantage // gcc and clang have 128 bit int types on some 64-bit archs. take some advantage