From 5a2b5c74c9b85fa303236f9151b6d024c47ca5f9 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 9 Sep 2020 10:16:54 -0700 Subject: [PATCH] s3: libsmb: Remove unused prioritize_ipv4_list(). Signed-off-by: Jeremy Allison Reviewed-by: Noel Power --- source3/libsmb/namequery.c | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c index 5b8bdd3a8fd..76a646555da 100644 --- a/source3/libsmb/namequery.c +++ b/source3/libsmb/namequery.c @@ -1300,40 +1300,6 @@ size_t remove_duplicate_addrs2_sa(struct samba_sockaddr *salist, size_t count ) return count; } -#if 0 -static bool prioritize_ipv4_list(struct ip_service *iplist, size_t count) -{ - TALLOC_CTX *frame = talloc_stackframe(); - struct ip_service *iplist_new = talloc_array(frame, struct ip_service, count); - size_t i, j; - - if (iplist_new == NULL) { - TALLOC_FREE(frame); - return false; - } - - j = 0; - - /* Copy IPv4 first. */ - for (i = 0; i < count; i++) { - if (iplist[i].ss.ss_family == AF_INET) { - iplist_new[j++] = iplist[i]; - } - } - - /* Copy IPv6. */ - for (i = 0; i < count; i++) { - if (iplist[i].ss.ss_family != AF_INET) { - iplist_new[j++] = iplist[i]; - } - } - - memcpy(iplist, iplist_new, sizeof(struct ip_service)*count); - TALLOC_FREE(frame); - return true; -} -#endif - static bool prioritize_ipv4_list_sa(struct samba_sockaddr *salist, size_t count) { TALLOC_CTX *frame = talloc_stackframe();