[Olsr-cvs] olsrd-current/src lq_avl.c,1.6,1.7

Thomas Lopatic (spam-protected)
Wed Mar 28 00:02:24 CEST 2007


Update of /cvsroot/olsrd/olsrd-current/src
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6828/src

Modified Files:
	lq_avl.c 
Log Message:
Eliminated tail recursion.


Index: lq_avl.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/lq_avl.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** lq_avl.c	27 Mar 2007 19:37:13 -0000	1.6
--- lq_avl.c	27 Mar 2007 22:02:22 -0000	1.7
***************
*** 411,420 ****
  }
  
! static struct avl_node *local_min(struct avl_node *node)
  {
!   if (node->left == NULL)
!     return node;
  
!   return local_min(node->left);
  }
  
--- 411,420 ----
  }
  
! static inline struct avl_node *local_min(struct avl_node *node)
  {
!   while (node->left != NULL)
!     node = node->left;
  
!   return node;
  }
  





More information about the Olsr-cvs mailing list