[Olsr-cvs] olsrd-current/lib/dyn_gw_plain/src olsrd_dyn_gw_plain.c, 1.2, 1.3

Bernd Petrovitsch (spam-protected)
Fri Apr 20 16:06:20 CEST 2007


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

Modified Files:
	olsrd_dyn_gw_plain.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_dyn_gw_plain.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/dyn_gw_plain/src/olsrd_dyn_gw_plain.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** olsrd_dyn_gw_plain.c	4 Feb 2007 20:47:50 -0000	1.2
--- olsrd_dyn_gw_plain.c	20 Apr 2007 14:06:18 -0000	1.3
***************
*** 59,63 ****
   */
  int 
! olsrd_plugin_interface_version()
  {
    return OLSRD_PLUGIN_INTERFACE_VERSION;
--- 59,63 ----
   */
  int 
! olsrd_plugin_interface_version(void)
  {
    return OLSRD_PLUGIN_INTERFACE_VERSION;
***************
*** 69,73 ****
   */
  int
! olsrd_plugin_register_param(char *key, char *value)
  {
    return 1;
--- 69,73 ----
   */
  int
! olsrd_plugin_register_param(char *key __attribute__((unused)), char *value __attribute__((unused)))
  {
    return 1;
***************
*** 79,83 ****
   */
  int
! olsrd_plugin_init()
  {
    gw_net.v4 = INET_NET;
--- 79,83 ----
   */
  int
! olsrd_plugin_init(void)
  {
    gw_net.v4 = INET_NET;
***************
*** 168,172 ****
   * called from olsrd main thread to keep the hna table thread-safe
   */
! void olsr_event(void* foo)
  {
    int res = check_gw(&gw_net, &gw_netmask);
--- 168,172 ----
   * called from olsrd main thread to keep the hna table thread-safe
   */
! void olsr_event(void* foo __attribute__((unused)))
  {
    int res = check_gw(&gw_net, &gw_netmask);





More information about the Olsr-cvs mailing list