git: 28cfced85b64 - stable/13 - in6: Consolidate IN6_ARE_ADDR_EQUAL definitions
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 10 Nov 2022 17:30:35 UTC
The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=28cfced85b64c8365aef7d7a15346514b03a8e50 commit 28cfced85b64c8365aef7d7a15346514b03a8e50 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2022-11-02 17:06:54 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2022-11-10 17:03:03 +0000 in6: Consolidate IN6_ARE_ADDR_EQUAL definitions It is ok to use memcmp() in the kernel. No functional change intended. Reviewed by: glebius, melifaro MFC after: 1 week Sponsored by: Modirum MDPay Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D37028 (cherry picked from commit 0d5d356b3649c2fba70bd8d657920620223831d3) --- sys/netinet6/in6.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/sys/netinet6/in6.h b/sys/netinet6/in6.h index 10bc1f91c554..82f876506f0f 100644 --- a/sys/netinet6/in6.h +++ b/sys/netinet6/in6.h @@ -219,19 +219,11 @@ extern const struct in6_addr in6addr_linklocal_allv2routers; /* * Equality - * NOTE: Some of kernel programming environment (for example, openbsd/sparc) - * does not supply memcmp(). For userland memcmp() is preferred as it is - * in ANSI standard. */ -#ifdef _KERNEL -#define IN6_ARE_ADDR_EQUAL(a, b) \ - (bcmp(&(a)->s6_addr[0], &(b)->s6_addr[0], sizeof(struct in6_addr)) == 0) -#else #if __BSD_VISIBLE #define IN6_ARE_ADDR_EQUAL(a, b) \ (memcmp(&(a)->s6_addr[0], &(b)->s6_addr[0], sizeof(struct in6_addr)) == 0) #endif -#endif /* * Unspecified