[Olsr-cvs] olsrd-current/src lq_avl.h,1.10,1.11

Bernd Petrovitsch (spam-protected)
Tue Sep 25 15:47:38 CEST 2007


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

Modified Files:
	lq_avl.h 
Log Message:
* "balance" in struct avl_node is "signed char".
   Thanks to John Hay <(spam-protected)> for reporting and to
   Thomas Lopatic <(spam-protected)> for confirming this.
* "leader" in struct avl_node is "unsigned char" as it is set to 0 and 1
   only (in src/lq_av.c).
* cleanup: added parentheres to arguments of a macro


Index: lq_avl.h
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/lq_avl.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** lq_avl.h	5 Sep 2007 16:11:10 -0000	1.10
--- lq_avl.h	25 Sep 2007 13:47:36 -0000	1.11
***************
*** 53,58 ****
    void *key;
    void *data;
!   char balance;
!   char leader;
  };
  
--- 53,58 ----
    void *key;
    void *data;
!   signed char balance;
!   unsigned char leader;
  };
  
***************
*** 84,89 ****
  
  #define inline_avl_comp_ipv4(ip1, ip2) \
!   (*(unsigned int *)ip1 == *(unsigned int *)ip2 ? 0 : \
!   *(unsigned int *)ip1 < *(unsigned int *)ip2 ? -1 : +1)
  
  #endif
--- 84,89 ----
  
  #define inline_avl_comp_ipv4(ip1, ip2) \
!   (*(unsigned int *)(ip1) == *(unsigned int *)(ip2) ? 0 :       \
!    *(unsigned int *)(ip1) < *(unsigned int *)(ip2) ? -1 : +1)
  
  #endif





More information about the Olsr-cvs mailing list