[Olsr-cvs] olsrd-current/lib/mini/src olsrd_plugin.c,1.2,1.3

Bernd Petrovitsch (spam-protected)
Fri Apr 20 15:46:04 CEST 2007


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

Modified Files:
	olsrd_plugin.c 
Log Message:
cleanup, 1. step (to get some local changes away):
* killed lots of warnings
* added __attribure__((unused)) and __attribure__((format(printf, ..., ...)))
* added "const"
* moved declarations of static functions into .c files
* added "static" declarations
* removed all "inline" declarations. Usually the compiler knows better anyways.
* removed emtpy "return" statements at the end of functions
* localized declarations
* avoided unnecessary data copies
* removed lots of empty lines
There is much more to do.



Index: olsrd_plugin.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/mini/src/olsrd_plugin.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** olsrd_plugin.c	29 May 2005 12:47:41 -0000	1.2
--- olsrd_plugin.c	20 Apr 2007 13:46:02 -0000	1.3
***************
*** 44,47 ****
--- 44,49 ----
  #include "olsr.h"
  
+ #define PLUGIN_INTERFACE_VERSION 1
+ 
  
  /****************************************************************************
***************
*** 54,60 ****
   */
  int 
! olsrd_plugin_interface_version()
  {
! 	return OLSRD_PLUGIN_INTERFACE_VERSION;
  }
  
--- 56,62 ----
   */
  int 
! olsrd_plugin_interface_version(void)
  {
! 	return PLUGIN_INTERFACE_VERSION;
  }
  
***************
*** 80,84 ****
   */
  int
! olsrd_plugin_init()
  {
  	printf("*** MINI: plugin_init\n");
--- 82,86 ----
   */
  int
! olsrd_plugin_init(void)
  {
  	printf("*** MINI: plugin_init\n");
***************
*** 108,112 ****
   */
  static void
! my_init()
  {
  	printf("*** MINI: constructor\n");
--- 110,114 ----
   */
  static void
! my_init(void)
  {
  	printf("*** MINI: constructor\n");
***************
*** 118,122 ****
   */
  static void
! my_fini()
  {
  	printf("*** MINI: destructor\n");
--- 120,124 ----
   */
  static void
! my_fini(void)
  {
  	printf("*** MINI: destructor\n");





More information about the Olsr-cvs mailing list