Changed initialization: many init functions are not needed any more since we now rely on the compiler initializing global and static variables to zero!

This commit is contained in:
goldsimon
2007-10-09 19:59:56 +00:00
parent 536f2e42d2
commit 199648ff37
23 changed files with 35 additions and 117 deletions

View File

@@ -43,7 +43,7 @@
extern "C" {
#endif
void ip_init(void);
#define ip_init() /* Compatibility define, not init needed. */
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,

View File

@@ -192,8 +192,7 @@ extern struct netif *netif_list;
/** The default network interface. */
extern struct netif *netif_default;
/* netif_init() must be called first. */
void netif_init(void);
#define netif_init() /* Compatibility define, not init needed. */
struct netif *netif_add(struct netif *netif, struct ip_addr *ipaddr, struct ip_addr *netmask,
struct ip_addr *gw,

View File

@@ -85,7 +85,7 @@ err_t raw_send (struct raw_pcb *pcb, struct pbuf *p);
/* 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() /* Compatibility define, not init needed. */
#ifdef __cplusplus
}

View File

@@ -136,7 +136,7 @@ struct stats_ {
extern struct stats_ lwip_stats;
void stats_init(void);
#define stats_init() /* Compatibility define, not init needed. */
#define STATS_INC(x) ++lwip_stats.x
#else

View File

@@ -52,8 +52,7 @@ struct tcp_pcb;
/* 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). */

View File

@@ -130,7 +130,8 @@ err_t udp_send (struct udp_pcb *pcb, struct pbuf *p);
/* 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() /* Compatibility define, not init needed. */
#if UDP_DEBUG
void udp_debug_print(struct udp_hdr *udphdr);

View File

@@ -141,7 +141,7 @@ struct etharp_q_entry {
};
#endif /* ARP_QUEUEING */
void etharp_init(void);
#define etharp_init() /* Compatibility define, not init needed. */
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);