From a9d3a0d37a9df900889e686aec1d1ab0be6d0826 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Mon, 3 Dec 2007 11:21:19 +0000 Subject: [PATCH] use ngx_queue_init() --- src/core/ngx_resolver.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/core/ngx_resolver.c b/src/core/ngx_resolver.c index 94d729c58..5b4a8bac2 100644 --- a/src/core/ngx_resolver.c +++ b/src/core/ngx_resolver.c @@ -116,17 +116,11 @@ ngx_resolver_create(ngx_peer_addr_t *addr, ngx_log_t *log) r->addr_rbtree.sentinel = &r->addr_sentinel; r->addr_rbtree.insert = ngx_rbtree_insert_value; - r->name_resend_queue.prev = &r->name_resend_queue; - r->name_resend_queue.next = &r->name_resend_queue; + ngx_queue_init(&r->name_resend_queue); + ngx_queue_init(&r->addr_resend_queue); - r->addr_resend_queue.prev = &r->addr_resend_queue; - r->addr_resend_queue.next = &r->addr_resend_queue; - - r->name_expire_queue.prev = &r->name_expire_queue; - r->name_expire_queue.next = &r->name_expire_queue; - - r->addr_expire_queue.prev = &r->addr_expire_queue; - r->addr_expire_queue.next = &r->addr_expire_queue; + ngx_queue_init(&r->name_expire_queue); + ngx_queue_init(&r->addr_expire_queue); r->event->handler = ngx_resolver_resend_handler; r->event->data = r;