2c2
< /* $FreeBSD: head/usr.sbin/ypldap/ypldap_dns.c 292270 2015-12-15 15:37:58Z araujo $ */
---
> /* $FreeBSD: head/usr.sbin/ypldap/ypldap_dns.c 297907 2016-04-13 03:36:34Z araujo $ */
51c51
< int host_dns(const char *s, struct ypldap_addr **hn);
---
> int host_dns(const char *, struct ypldap_addr_list *);
132c132,133
< struct ypldap_addr *h, *hn;
---
> struct ypldap_addr_list hn = TAILQ_HEAD_INITIALIZER(hn);
> struct ypldap_addr *h;
179,180c180,182
< h = hn;
< while (h != NULL) {
---
> while(!TAILQ_EMPTY(&hn)) {
> h = TAILQ_FIRST(&hn);
> TAILQ_REMOVE(&hn, h, next);
182d183
< hn = h->next;
184d184
< h = hn;
207c207
< host_dns(const char *s, struct ypldap_addr **hn)
---
> host_dns(const char *s, struct ypldap_addr_list *hn)
213c213
< struct ypldap_addr *h, *hh = NULL;
---
> struct ypldap_addr *h;
246,247c246
< h->next = hh;
< hh = h;
---
> TAILQ_INSERT_HEAD(hn, h, next);
251,252d249
<
< *hn = hh;
< /* $FreeBSD: head/usr.sbin/ypldap/ypldap_dns.c 292270 2015-12-15 15:37:58Z araujo $ */
---
> /* $FreeBSD: head/usr.sbin/ypldap/ypldap_dns.c 297907 2016-04-13 03:36:34Z araujo $ */
51c51
< int host_dns(const char *s, struct ypldap_addr **hn);
---
> int host_dns(const char *, struct ypldap_addr_list *);
132c132,133
< struct ypldap_addr *h, *hn;
---
> struct ypldap_addr_list hn = TAILQ_HEAD_INITIALIZER(hn);
> struct ypldap_addr *h;
179,180c180,182
< h = hn;
< while (h != NULL) {
---
> while(!TAILQ_EMPTY(&hn)) {
> h = TAILQ_FIRST(&hn);
> TAILQ_REMOVE(&hn, h, next);
182d183
< hn = h->next;
184d184
< h = hn;
207c207
< host_dns(const char *s, struct ypldap_addr **hn)
---
> host_dns(const char *s, struct ypldap_addr_list *hn)
213c213
< struct ypldap_addr *h, *hh = NULL;
---
> struct ypldap_addr *h;
246,247c246
< h->next = hh;
< hh = h;
---
> TAILQ_INSERT_HEAD(hn, h, next);
251,252d249
<
< *hn = hh;