From 1cb6b71b4059b5fba67f78aebdbd7b4c6d8547df Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 30 Oct 2024 10:41:08 -0400 Subject: lib, tests: Remove in6addr_cmp function from the system This function should just be memcmp. Signed-off-by: Donald Sharp --- lib/sockunion.c | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'lib/sockunion.c') diff --git a/lib/sockunion.c b/lib/sockunion.c index 1b08a06e93..4a7c190953 100644 --- a/lib/sockunion.c +++ b/lib/sockunion.c @@ -588,23 +588,6 @@ static void __attribute__((unused)) sockunion_print(const union sockunion *su) } } -int in6addr_cmp(const struct in6_addr *addr1, const struct in6_addr *addr2) -{ - unsigned int i; - const uint8_t *p1, *p2; - - p1 = (const uint8_t *)addr1; - p2 = (const uint8_t *)addr2; - - for (i = 0; i < sizeof(struct in6_addr); i++) { - if (p1[i] > p2[i]) - return 1; - else if (p1[i] < p2[i]) - return -1; - } - return 0; -} - int sockunion_cmp(const union sockunion *su1, const union sockunion *su2) { if (su1->sa.sa_family > su2->sa.sa_family) -- cgit v1.2.3