nwrap: simplify nwrap_file_getaddrinfo: remove a variable
authorMichael Adam <obnox@samba.org>
Wed, 11 Nov 2015 09:38:31 +0000 (10:38 +0100)
committerMichael Adam <obnox@samba.org>
Thu, 12 Nov 2015 10:42:33 +0000 (11:42 +0100)
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
src/nss_wrapper.c

index 653b8d7bfcd5d6cea182457b639fd99ff1aeaf63..b55e24e4b80f7f63bc89ba9d64486f2130f2919f 100644 (file)
@@ -3479,8 +3479,7 @@ static struct addrinfo *nwrap_files_getaddrinfo(const char *name,
                                                const struct addrinfo *hints,
                                                struct addrinfo **ai_tail)
 {
-       struct nwrap_entlist *el_head;
-       struct nwrap_entlist *el_cur;
+       struct nwrap_entlist *el;
        struct hostent *he;
        struct addrinfo *ai = NULL;
        struct addrinfo *ai_head = NULL;
@@ -3519,12 +3518,11 @@ static struct addrinfo *nwrap_files_getaddrinfo(const char *name,
        NWRAP_LOG(NWRAP_LOG_DEBUG, "Name: %s found.", h_name_lower);
        SAFE_FREE(h_name_lower);
 
-       el_head = (struct nwrap_entlist *)e_p->data;
-
-       for (el_cur = el_head; el_cur != NULL; el_cur = el_cur->next) {
+       for (el = (struct nwrap_entlist *)e_p->data; el != NULL; el = el->next)
+       {
                int rc;
 
-               he = &(el_cur->ed->ht);
+               he = &(el->ed->ht);
 
                if (hints->ai_family != AF_UNSPEC &&
                    he->h_addrtype != hints->ai_family) {