[Olsr-cvs] olsrd-current/lib/nameservice/src nameservice.c, 1.26, 1.27

Bernd Petrovitsch (spam-protected)
Tue Aug 28 22:45:19 CEST 2007


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

Modified Files:
	nameservice.c 
Log Message:
- Made a function from the ME_TO_DOUBLE() macro (in src/mantissa.h).
  This saves code throughout the code even on i386 and will even more
  on architectures without floating point units and "-msoft-float".
- And the mathemathics in src/mantissa.h is reformulated to minimize
  floating point operations to save CPU power - especially on embedded
  devices.


Index: nameservice.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/nameservice/src/nameservice.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** nameservice.c	25 Aug 2007 19:48:42 -0000	1.26
--- nameservice.c	28 Aug 2007 20:45:17 -0000	1.27
***************
*** 614,623 ****
  	/* Fetch the message based on IP version */
  	if(olsr_cnf->ip_version == AF_INET) {
! 		vtime = ME_TO_DOUBLE(m->v4.olsr_vtime);
  		size = ntohs(m->v4.olsr_msgsize);
  		namemessage = (struct namemsg*)&m->v4.message;
  	}
  	else {
! 		vtime = ME_TO_DOUBLE(m->v6.olsr_vtime);
  		size = ntohs(m->v6.olsr_msgsize);
  		namemessage = (struct namemsg*)&m->v6.message;
--- 614,623 ----
  	/* Fetch the message based on IP version */
  	if(olsr_cnf->ip_version == AF_INET) {
! 		vtime = me_to_double(m->v4.olsr_vtime);
  		size = ntohs(m->v4.olsr_msgsize);
  		namemessage = (struct namemsg*)&m->v4.message;
  	}
  	else {
! 		vtime = me_to_double(m->v6.olsr_vtime);
  		size = ntohs(m->v6.olsr_msgsize);
  		namemessage = (struct namemsg*)&m->v6.message;





More information about the Olsr-cvs mailing list