Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Oct 2001 06:34:18 -0700 (PDT)
From:      Ravindra Rathi <ravindra_rathi@yahoo.com>
To:        freebsd-net@FreeBSD.ORG
Cc:        ravindra_rathi@yahoo.com
Subject:   doubt in radix.c source-code
Message-ID:  <20011001133418.97976.qmail@web12302.mail.yahoo.com>

next in thread | raw e-mail | index | archive | help
Hi all,
   I am going through the function 
int
rn_walktree (register struct radix_node *rn,
rn_walk_function f, ...)

defined in radix.c file. I have doubt about following
while loop in that function.

/* If at right child go back up, otherwise, go right
*/
while (rn->rn_p->rn_r == rn && (rn->rn_flags &
RNF_ROOT) == 0)
 rn = rn->rn_p;

Looking at the complete function, I think 
(rn->rn_flags & RNF_ROOT) == 0 
check in above while loop is unnecessary. I say this
because of following lines down below in the function.
if (rn->rn_flags & RNF_ROOT) {
  return (0);
}

Am I missing anything? Any insight...?

TIA,
Rathi

__________________________________________________
Do You Yahoo!?
Listen to your Yahoo! Mail messages from any phone.
http://phone.yahoo.com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011001133418.97976.qmail>