From dcec2fa8c90e0d169bcc12362acc0a78f545b31f Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Tue, 2 Jan 2007 23:04:54 +0000 Subject: [PATCH] a sentinel must be black --- src/core/ngx_rbtree.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/ngx_rbtree.h b/src/core/ngx_rbtree.h index 008db2a25..16524ffc8 100644 --- a/src/core/ngx_rbtree.h +++ b/src/core/ngx_rbtree.h @@ -50,6 +50,11 @@ void ngx_rbtree_insert_timer_value(ngx_rbtree_node_t *root, ngx_rbtree_node_t *node, ngx_rbtree_node_t *sentinel); +/* a sentinel must be black */ + +#define ngx_rbtree_sentinel_init(node) node->color = 0 + + static ngx_inline ngx_rbtree_node_t * ngx_rbtree_min(ngx_rbtree_node_t *node, ngx_rbtree_node_t *sentinel) {