From 2292bceadf03732ecfd953670bf266b765372f37 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Thu, 22 Apr 1999 14:16:52 +0000 Subject: [PATCH] tried to ascend a level in dns_rbtnodechain_next when at top level --- lib/dns/rbt.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/dns/rbt.c b/lib/dns/rbt.c index 197f9ef008..9876c04bd4 100644 --- a/lib/dns/rbt.c +++ b/lib/dns/rbt.c @@ -15,7 +15,7 @@ * SOFTWARE. */ -/* $Id: rbt.c,v 1.45 1999/04/20 22:01:00 tale Exp $ */ +/* $Id: rbt.c,v 1.46 1999/04/22 14:16:52 tale Exp $ */ /* Principal Authors: DCL */ @@ -2076,13 +2076,12 @@ dns_rbtnodechain_next(dns_rbtnodechain_t *chain, dns_name_t *name, } } - if (successor == NULL) { + if (successor == NULL && chain->level_count > 0) { /* * Reached the root without having traversed * any left pointers, so this level is done. */ - INSIST(chain->level_count > 0 && - chain->ancestor_count > 0); + INSIST(chain->ancestor_count > 0); current = chain->levels[--chain->level_count]; chain->ancestor_count--; new_origin = ISC_TRUE; -- GitLab