From 15fbfb736397d7640eefda1841bfe4a07ed19f2d Mon Sep 17 00:00:00 2001 From: Sylvain Rochet Date: Thu, 21 Apr 2016 23:25:48 +0200 Subject: [PATCH] PPP, remove useless ppp_init function Simon says: ppp_init() does not seem to be used. The only thing it does is calling magic_init(), which is not required because it its called again later from ppp_input(). Also, the time from startup is rather constant, so calling sys_jiffies() from ppp_init() does not create a random number. --- src/core/init.c | 4 ---- src/include/netif/ppp/ppp_impl.h | 7 ------- src/netif/ppp/ppp.c | 12 ------------ 3 files changed, 23 deletions(-) diff --git a/src/core/init.c b/src/core/init.c index 99419df7..0e17a7a0 100644 --- a/src/core/init.c +++ b/src/core/init.c @@ -59,7 +59,6 @@ #include "lwip/nd6.h" #include "lwip/mld6.h" #include "lwip/api.h" -#include "netif/ppp/ppp_impl.h" /* Compile-time sanity checks for configuration errors. * These can be done independently of LWIP_DEBUG, without penalty. @@ -345,9 +344,6 @@ lwip_init(void) #if LWIP_DNS dns_init(); #endif /* LWIP_DNS */ -#if PPP_SUPPORT - ppp_init(); -#endif #if LWIP_TIMERS sys_timeouts_init(); diff --git a/src/include/netif/ppp/ppp_impl.h b/src/include/netif/ppp/ppp_impl.h index 3ee44d6a..ca01272e 100644 --- a/src/include/netif/ppp/ppp_impl.h +++ b/src/include/netif/ppp/ppp_impl.h @@ -378,13 +378,6 @@ struct pppd_stats { * PPP private functions */ -/* - * Functions called from lwIP core. - */ - -/* initialize the PPP subsystem */ -int ppp_init(void); - /* * Functions called from PPP link protocols. diff --git a/src/netif/ppp/ppp.c b/src/netif/ppp/ppp.c index b295a107..2cc614a0 100644 --- a/src/netif/ppp/ppp.c +++ b/src/netif/ppp/ppp.c @@ -561,18 +561,6 @@ err: /*** PRIVATE FUNCTION DEFINITIONS ***/ /************************************/ -/* Initialize the PPP subsystem. */ -int ppp_init(void) { - - /* - * Initialize magic number generator now so that protocols may - * use magic numbers in initialization. - */ - magic_init(); - - return 0; -} - /* * Create a new PPP control block. *