]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: libsmb: Remove now unused internal functions ip_service_compare() and sort_servic...
authorJeremy Allison <jra@samba.org>
Wed, 9 Sep 2020 16:53:50 +0000 (09:53 -0700)
committerNoel Power <npower@samba.org>
Tue, 15 Sep 2020 10:09:40 +0000 (10:09 +0000)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
source3/libsmb/namequery.c

index 6a6f0b05ae4ca3e81d560a1ddbd08a90054e9196..c54f0160e4ee92c5f120e97f2ef48119a2e39c5d 100644 (file)
@@ -1182,31 +1182,6 @@ static int addr_compare(const struct sockaddr_storage *ss1,
        return max_bits2 - max_bits1;
 }
 
-/*******************************************************************
- compare 2 ldap IPs by nearness to our interfaces - used in qsort
-*******************************************************************/
-
-#if 0
-static int ip_service_compare(struct ip_service *ss1, struct ip_service *ss2)
-{
-       int result;
-
-       if ((result = addr_compare(&ss1->ss, &ss2->ss)) != 0) {
-               return result;
-       }
-
-       if (ss1->port > ss2->port) {
-               return 1;
-       }
-
-       if (ss1->port < ss2->port) {
-               return -1;
-       }
-
-       return 0;
-}
-#endif
-
 /*
   sort an IP list so that names that are close to one of our interfaces
   are at the top. This prevents the problem where a WINS server returns an IP
@@ -1222,17 +1197,6 @@ static void sort_addr_list(struct sockaddr_storage *sslist, size_t count)
        TYPESAFE_QSORT(sslist, count, addr_compare);
 }
 
-#if 0
-static void sort_service_list(struct ip_service *servlist, size_t count)
-{
-       if (count <= 1) {
-               return;
-       }
-
-       TYPESAFE_QSORT(servlist, count, ip_service_compare);
-}
-#endif
-
 static int samba_sockaddr_compare(struct samba_sockaddr *sa1,
                                struct samba_sockaddr *sa2)
 {