nwrap: remove ai_tail argument from nwrap_files_getaddrinfo()
authorMichael Adam <obnox@samba.org>
Thu, 12 Nov 2015 09:20:37 +0000 (10:20 +0100)
committerMichael Adam <obnox@samba.org>
Mon, 11 Jan 2016 11:25:31 +0000 (12:25 +0100)
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
lib/nss_wrapper/nss_wrapper.c

index 539eb2ab47e66bd061e378bda1a2841c2feb09a8..9a7fbf5110af0808f58cd38b6bf243174fef87d6 100644 (file)
@@ -3508,12 +3508,10 @@ int gethostbyname_r(const char *name,
 static int nwrap_files_getaddrinfo(const char *name,
                                   unsigned short port,
                                   const struct addrinfo *hints,
-                                  struct addrinfo **ai,
-                                  struct addrinfo **ai_tail)
+                                  struct addrinfo **ai)
 {
        struct nwrap_entlist *el;
        struct hostent *he;
-       struct addrinfo *ai_new = NULL;
        struct addrinfo *ai_head = NULL;
        struct addrinfo *ai_cur = NULL;
        char *h_name_lower;
@@ -3560,6 +3558,7 @@ static int nwrap_files_getaddrinfo(const char *name,
        for (el = (struct nwrap_entlist *)e_p->data; el != NULL; el = el->next)
        {
                int rc2;
+               struct addrinfo *ai_new = NULL;
 
                he = &(el->ed->ht);
 
@@ -3602,7 +3601,6 @@ static int nwrap_files_getaddrinfo(const char *name,
        }
 
        *ai = ai_head;
-       *ai_tail = ai_new;
 
        return rc;
 }
@@ -5135,7 +5133,6 @@ static int nwrap_getaddrinfo(const char *node,
                             struct addrinfo **res)
 {
        struct addrinfo *ai = NULL;
-       struct addrinfo *ai_tail;
        unsigned short port = 0;
        struct {
                int family;
@@ -5236,7 +5233,7 @@ valid_port:
                return EAI_ADDRFAMILY;
        }
 
-       rc = nwrap_files_getaddrinfo(node, port, hints, &ai, &ai_tail);
+       rc = nwrap_files_getaddrinfo(node, port, hints, &ai);
        if (rc != 0) {
                int ret;
                struct addrinfo *p = NULL;