Index: doc/contrib.txt
===================================================================
RCS file: /sources/lwip/lwip/doc/contrib.txt,v
retrieving revision 1.10
diff -u -r1.10 contrib.txt
--- doc/contrib.txt	1 Jan 2005 18:06:21 -0000	1.10
+++ doc/contrib.txt	4 Oct 2007 18:43:39 -0000
@@ -21,7 +21,8 @@
 6. one space and no newline before opening curly braces of a block.
 7. closing curly brace on a single line.
 8. spaces surrounding assignment and comparisons.
-9. use current source code style as further reference.
+9. don't initialize static and/or global variables to zero, the compiler takes care of that.
+10. use current source code style as further reference.
 
 2.2 Source code documentation style:
 
Index: src/api/sockets.c
===================================================================
RCS file: /sources/lwip/lwip/src/api/sockets.c,v
retrieving revision 1.89
diff -u -r1.89 sockets.c
--- src/api/sockets.c	15 Sep 2007 15:19:41 -0000	1.89
+++ src/api/sockets.c	4 Oct 2007 18:45:02 -0000
@@ -86,10 +86,11 @@
 };
 
 static struct lwip_socket sockets[NUM_SOCKETS];
-static struct lwip_select_cb *select_cb_list = 0;
+static struct lwip_select_cb *select_cb_list;
 
-static sys_sem_t socksem = 0;
-static sys_sem_t selectsem = 0;
+/* Since SYS_SEM_NULL may be != NULL, initialization is necessary! */
+static sys_sem_t socksem = SYS_SEM_NULL;
+static sys_sem_t selectsem = SYS_SEM_NULL;
 
 static void event_callback(struct netconn *conn, enum netconn_evt evt, u16_t len);
 static void lwip_getsockopt_internal(void *arg);
Index: src/api/tcpip.c
===================================================================
RCS file: /sources/lwip/lwip/src/api/tcpip.c,v
retrieving revision 1.61
diff -u -r1.61 tcpip.c
--- src/api/tcpip.c	12 Sep 2007 09:19:43 -0000	1.61
+++ src/api/tcpip.c	4 Oct 2007 18:45:30 -0000
@@ -54,18 +54,18 @@
 #include "netif/ppp_oe.h"
 
 /* global variables */
-static void (* tcpip_init_done)(void *arg) = NULL;
-static void *tcpip_init_done_arg           = NULL;
-static sys_mbox_t mbox                     = SYS_MBOX_NULL;
+static void (* tcpip_init_done)(void *arg);
+static void *tcpip_init_done_arg;
+static sys_mbox_t mbox = SYS_MBOX_NULL;
 
 #if LWIP_TCPIP_CORE_LOCKING
 /** The global semaphore to lock the stack. */
-sys_sem_t lock_tcpip_core = 0;
+sys_sem_t lock_tcpip_core = SYS_SEM_NULL;
 #endif /* LWIP_TCPIP_CORE_LOCKING */
 
 #if LWIP_TCP
 /* global variable that shows if the tcp timer is currently scheduled or not */
-static int tcpip_tcp_timer_active = 0;
+static int tcpip_tcp_timer_active;
 
 /**
  * Timer callback function that calls tcp_tmr() and reschedules itself.
Index: src/core/mem.c
===================================================================
RCS file: /sources/lwip/lwip/src/core/mem.c,v
retrieving revision 1.50
diff -u -r1.50 mem.c
--- src/core/mem.c	15 Sep 2007 11:34:06 -0000	1.50
+++ src/core/mem.c	4 Oct 2007 18:58:31 -0000
@@ -206,13 +206,11 @@
     (SIZEOF_STRUCT_MEM & (MEM_ALIGNMENT-1)) == 0);
 
   /* align the heap */
-  memset(ram_heap, 0, sizeof(ram_heap));
   ram = LWIP_MEM_ALIGN(ram_heap);
   /* initialize the start of the heap */
   mem = (struct mem *)ram;
   mem->next = MEM_SIZE_ALIGNED;
-  mem->prev = 0;
-  mem->used = 0;
+  /* mem->prev and mem->used are alreay set to 0 (by compiler initialization) */
   /* initialize the end of the heap */
   ram_end = (struct mem *)&ram[MEM_SIZE_ALIGNED];
   ram_end->used = 1;
Index: src/core/netif.c
===================================================================
RCS file: /sources/lwip/lwip/src/core/netif.c,v
retrieving revision 1.63
diff -u -r1.63 netif.c
--- src/core/netif.c	9 Sep 2007 20:46:34 -0000	1.63
+++ src/core/netif.c	4 Oct 2007 18:57:42 -0000
@@ -61,14 +61,6 @@
 struct netif *netif_list = NULL;
 struct netif *netif_default = NULL;
 
-/**
- * Initialize this module
- */
-void
-netif_init(void)
-{
-  netif_list = netif_default = NULL;
-}
 
 /**
  * Add a network interface to the list of lwIP netifs.
Index: src/core/raw.c
===================================================================
RCS file: /sources/lwip/lwip/src/core/raw.c,v
retrieving revision 1.16
diff -u -r1.16 raw.c
--- src/core/raw.c	7 Sep 2007 23:02:00 -0000	1.16
+++ src/core/raw.c	4 Oct 2007 18:57:21 -0000
@@ -55,16 +55,8 @@
 #include <string.h>
 
 /** The list of RAW PCBs */
-static struct raw_pcb *raw_pcbs = NULL;
+static struct raw_pcb *raw_pcbs;
 
-/**
- * Initialize this module
- */
-void
-raw_init(void)
-{
-  raw_pcbs = NULL;
-}
 
 /**
  * Determine if in incoming IP packet is covered by a RAW PCB
Index: src/core/stats.c
===================================================================
RCS file: /sources/lwip/lwip/src/core/stats.c,v
retrieving revision 1.24
diff -u -r1.24 stats.c
--- src/core/stats.c	7 Sep 2007 23:02:00 -0000	1.24
+++ src/core/stats.c	4 Oct 2007 18:57:12 -0000
@@ -48,11 +48,6 @@
 
 struct stats_ lwip_stats;
 
-void
-stats_init(void)
-{
-  memset(&lwip_stats, 0, sizeof(struct stats_));
-}
 #if LWIP_STATS_DISPLAY
 void
 stats_display_proto(struct stats_proto *proto, char *name)
Index: src/core/tcp.c
===================================================================
RCS file: /sources/lwip/lwip/src/core/tcp.c,v
retrieving revision 1.69
diff -u -r1.69 tcp.c
--- src/core/tcp.c	20 Sep 2007 18:27:50 -0000	1.69
+++ src/core/tcp.c	4 Oct 2007 18:57:01 -0000
@@ -74,24 +74,6 @@
 static u8_t tcp_timer;
 static u16_t tcp_new_port(void);
 
-/**
- * Initializes the TCP layer.
- */
-void
-tcp_init(void)
-{
-  /* Clear globals. */
-  tcp_bound_pcbs = NULL;
-  tcp_listen_pcbs.listen_pcbs = NULL;
-  tcp_active_pcbs = NULL;
-  tcp_tw_pcbs = NULL;
-  tcp_tmp_pcb = NULL;
-  
-  /* initialize timer */
-  tcp_ticks = 0;
-  tcp_timer = 0;
-  
-}
 
 /**
  * Called periodically to dispatch TCP timers.
Index: src/core/udp.c
===================================================================
RCS file: /sources/lwip/lwip/src/core/udp.c,v
retrieving revision 1.98
diff -u -r1.98 udp.c
--- src/core/udp.c	15 Sep 2007 15:19:41 -0000	1.98
+++ src/core/udp.c	4 Oct 2007 18:56:48 -0000
@@ -62,16 +62,7 @@
 
 /* The list of UDP PCBs */
 /* exported in udp.h (was static) */
-struct udp_pcb *udp_pcbs = NULL;
-
-/**
- * Initialize the UDP module
- */
-void
-udp_init(void)
-{
-  udp_pcbs = NULL;
-}
+struct udp_pcb *udp_pcbs;
 
 /**
  * Process an incoming UDP datagram.
Index: src/core/ipv4/igmp.c
===================================================================
RCS file: /sources/lwip/lwip/src/core/ipv4/igmp.c,v
retrieving revision 1.23
diff -u -r1.23 igmp.c
--- src/core/ipv4/igmp.c	9 Sep 2007 20:46:34 -0000	1.23
+++ src/core/ipv4/igmp.c	4 Oct 2007 18:59:17 -0000
@@ -113,8 +113,6 @@
 
   IP4_ADDR(&allsystems, 224, 0, 0, 1);
   IP4_ADDR(&allrouters, 224, 0, 0, 2);
-
-  igmp_group_list = NULL;
 }
 
 #ifdef LWIP_DEBUG
Index: src/core/ipv4/ip.c
===================================================================
RCS file: /sources/lwip/lwip/src/core/ipv4/ip.c,v
retrieving revision 1.56
diff -u -r1.56 ip.c
--- src/core/ipv4/ip.c	9 Sep 2007 20:46:34 -0000	1.56
+++ src/core/ipv4/ip.c	4 Oct 2007 18:59:34 -0000
@@ -56,17 +56,6 @@
 #include "arch/perf.h"
 
 /**
- * Initializes the IP layer.
- */
-void
-ip_init(void)
-{
-#if IP_REASSEMBLY
-  ip_reass_init();
-#endif
-}
-
-/**
  * Finds the appropriate network interface for a given IP address. It
  * searches the list of network interfaces linearly. A match is found
  * if the masked IP address of the network interface equals the masked
Index: src/core/ipv4/ip_frag.c
===================================================================
RCS file: /sources/lwip/lwip/src/core/ipv4/ip_frag.c,v
retrieving revision 1.35
diff -u -r1.35 ip_frag.c
--- src/core/ipv4/ip_frag.c	7 Sep 2007 23:02:01 -0000	1.35
+++ src/core/ipv4/ip_frag.c	4 Oct 2007 18:59:29 -0000
@@ -60,17 +60,6 @@
 #endif /* IP_REASSEMBLY */
 
 #if IP_REASSEMBLY
-/**
- * Initializes IP reassembly states.
- */
-void
-ip_reass_init(void)
-{
-  ip_reasstmr = 0;
-  ip_reassflags = 0;
-  ip_reasslen = 0;
-  memset(ip_reassbitmap, 0, sizeof(ip_reassbitmap));
-}
 
 /**
  * Reassembly timer base function
Index: src/core/snmp/mib_structs.c
===================================================================
RCS file: /sources/lwip/lwip/src/core/snmp/mib_structs.c,v
retrieving revision 1.20
diff -u -r1.20 mib_structs.c
--- src/core/snmp/mib_structs.c	7 Sep 2007 23:02:01 -0000	1.20
+++ src/core/snmp/mib_structs.c	4 Oct 2007 18:48:55 -0000
@@ -53,7 +53,7 @@
   /** right child next level */
   u8_t r_nl;
 };
-static u8_t node_stack_cnt = 0;
+static u8_t node_stack_cnt;
 static struct nse node_stack[NODE_STACK_SIZE];
 
 /**
Index: src/core/snmp/msg_in.c
===================================================================
RCS file: /sources/lwip/lwip/src/core/snmp/msg_in.c,v
retrieving revision 1.30
diff -u -r1.30 msg_in.c
--- src/core/snmp/msg_in.c	7 Sep 2007 23:02:01 -0000	1.30
+++ src/core/snmp/msg_in.c	4 Oct 2007 18:49:33 -0000
@@ -56,7 +56,7 @@
 /* statically allocated buffers for SNMP_CONCURRENT_REQUESTS */
 struct snmp_msg_pstat msg_input_list[SNMP_CONCURRENT_REQUESTS];
 /* UDP Protocol Control Block */
-struct udp_pcb *snmp1_pcb = NULL;
+struct udp_pcb *snmp1_pcb;
 
 static void snmp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, struct ip_addr *addr, u16_t port);
 static err_t snmp_pdu_header_check(struct pbuf *p, u16_t ofs, u16_t pdu_len, u16_t *ofs_ret, struct snmp_msg_pstat *m_stat);
Index: src/include/ipv4/lwip/ip.h
===================================================================
RCS file: /sources/lwip/lwip/src/include/ipv4/lwip/ip.h,v
retrieving revision 1.26
diff -u -r1.26 ip.h
--- src/include/ipv4/lwip/ip.h	7 Sep 2007 23:47:03 -0000	1.26
+++ src/include/ipv4/lwip/ip.h	4 Oct 2007 19:00:41 -0000
@@ -43,7 +43,7 @@
 extern "C" {
 #endif
 
-void ip_init(void);
+#define ip_init()
 struct netif *ip_route(struct ip_addr *dest);
 err_t ip_input(struct pbuf *p, struct netif *inp);
 err_t ip_output(struct pbuf *p, struct ip_addr *src, struct ip_addr *dest,
Index: src/include/lwip/netif.h
===================================================================
RCS file: /sources/lwip/lwip/src/include/lwip/netif.h,v
retrieving revision 1.41
diff -u -r1.41 netif.h
--- src/include/lwip/netif.h	9 Sep 2007 20:46:34 -0000	1.41
+++ src/include/lwip/netif.h	4 Oct 2007 19:00:53 -0000
@@ -193,7 +193,7 @@
 extern struct netif *netif_default;
 
 /* netif_init() must be called first. */
-void netif_init(void);
+#define netif_init()
 
 struct netif *netif_add(struct netif *netif, struct ip_addr *ipaddr, struct ip_addr *netmask,
       struct ip_addr *gw,
Index: src/include/lwip/raw.h
===================================================================
RCS file: /sources/lwip/lwip/src/include/lwip/raw.h,v
retrieving revision 1.11
diff -u -r1.11 raw.h
--- src/include/lwip/raw.h	7 Sep 2007 23:02:03 -0000	1.11
+++ src/include/lwip/raw.h	4 Oct 2007 19:00:30 -0000
@@ -85,7 +85,7 @@
 
 /* The following functions are the lower layer interface to RAW. */
 u8_t             raw_input      (struct pbuf *p, struct netif *inp);
-void             raw_init       (void);
+#define raw_init()
 
 #ifdef __cplusplus
 }
Index: src/include/lwip/stats.h
===================================================================
RCS file: /sources/lwip/lwip/src/include/lwip/stats.h,v
retrieving revision 1.17
diff -u -r1.17 stats.h
--- src/include/lwip/stats.h	6 Sep 2007 16:43:44 -0000	1.17
+++ src/include/lwip/stats.h	4 Oct 2007 19:01:02 -0000
@@ -136,7 +136,7 @@
 
 extern struct stats_ lwip_stats;
 
-void stats_init(void);
+#define stats_init()
 
 #define STATS_INC(x) ++lwip_stats.x
 #else
Index: src/include/lwip/tcp.h
===================================================================
RCS file: /sources/lwip/lwip/src/include/lwip/tcp.h,v
retrieving revision 1.53
diff -u -r1.53 tcp.h
--- src/include/lwip/tcp.h	13 Sep 2007 17:46:13 -0000	1.53
+++ src/include/lwip/tcp.h	4 Oct 2007 19:00:09 -0000
@@ -52,8 +52,7 @@
 /* Functions for interfacing with TCP: */
 
 /* Lower layer interface to TCP: */
-void             tcp_init    (void);  /* Must be called first to
-                                         initialize TCP. */
+#define tcp_init() /* Compatibility define, not init needed. */
 void             tcp_tmr     (void);  /* Must be called every
                                          TCP_TMR_INTERVAL
                                          ms. (Typically 250 ms). */
Index: src/include/lwip/udp.h
===================================================================
RCS file: /sources/lwip/lwip/src/include/lwip/udp.h,v
retrieving revision 1.24
diff -u -r1.24 udp.h
--- src/include/lwip/udp.h	15 Sep 2007 15:19:41 -0000	1.24
+++ src/include/lwip/udp.h	4 Oct 2007 19:00:20 -0000
@@ -130,7 +130,7 @@
 
 /* The following functions are the lower layer interface to UDP. */
 void             udp_input      (struct pbuf *p, struct netif *inp);
-void             udp_init       (void);
+#define udp_init()
 
 #if UDP_DEBUG
 void udp_debug_print(struct udp_hdr *udphdr);
Index: src/include/netif/etharp.h
===================================================================
RCS file: /sources/lwip/lwip/src/include/netif/etharp.h,v
retrieving revision 1.38
diff -u -r1.38 etharp.h
--- src/include/netif/etharp.h	7 Sep 2007 23:02:03 -0000	1.38
+++ src/include/netif/etharp.h	4 Oct 2007 18:55:56 -0000
@@ -141,7 +141,7 @@
 };
 #endif /* ARP_QUEUEING */
 
-void etharp_init(void);
+#define etharp_init()
 void etharp_tmr(void);
 s8_t etharp_find_addr(struct netif *netif, struct ip_addr *ipaddr,
          struct eth_addr **eth_ret, struct ip_addr **ip_ret);
Index: src/netif/etharp.c
===================================================================
RCS file: /sources/lwip/lwip/src/netif/etharp.c,v
retrieving revision 1.135
diff -u -r1.135 etharp.c
--- src/netif/etharp.c	7 Sep 2007 23:02:03 -0000	1.135
+++ src/netif/etharp.c	4 Oct 2007 18:55:41 -0000
@@ -103,7 +103,7 @@
 const struct eth_addr ethzero = {{0,0,0,0,0,0}};
 static struct etharp_entry arp_table[ARP_TABLE_SIZE];
 #if !LWIP_NETIF_HWADDRHINT
-static u8_t etharp_cached_entry = 0;
+static u8_t etharp_cached_entry;
 #endif
 
 /**
@@ -122,29 +122,13 @@
 
 static err_t update_arp_entry(struct netif *netif, struct ip_addr *ipaddr, struct eth_addr *ethaddr, u8_t flags);
 
-/**
- * Initializes ARP module.
- */
-void
-etharp_init(void)
-{
-  u8_t i;
-
-  LWIP_ASSERT("ARP_TABLE_SIZE < 0x80 (due to s8_t limitation)",
-              (ARP_TABLE_SIZE < 0x80));
-
-  /* clear ARP entries */
-  for (i = 0; i < ARP_TABLE_SIZE; ++i) {
-    /* use memset to be safe (intialize all future variables to 0) */
-    memset(&arp_table[i], 0, sizeof(struct etharp_entry));
-    arp_table[i].state = ETHARP_STATE_EMPTY;
-#if ARP_QUEUEING
-    arp_table[i].q = NULL;
+/* Some checks, instead of etharp_init(): */
+#if ETHARP_STATE_EMPTY != 0
+#error ETHARP_STATE_EMPTY must be 0 to ensure correct initialization value!
+#endif
+#if (LWIP_ARP && (ARP_TABLE_SIZE > 0x7f))
+  #error "If you want to use ARP, ARP_TABLE_SIZE must fit in an s8_t, so, you have to reduce it in your lwipopts.h"
 #endif
-    arp_table[i].ctime = 0;
-    arp_table[i].netif = NULL;
-  }
-}
 
 #if ARP_QUEUEING
 /**
