PPP, CORE, Removed useless enabled_flag from struct protent

Our struct protent are const everywhere to save RAM, enable/disable
flag on a const struct is useless, saving some flash, removed.
This commit is contained in:
Sylvain Rochet
2015-02-18 21:32:58 +01:00
parent 730529353d
commit b71d9ce3f6
12 changed files with 10 additions and 23 deletions

View File

@@ -711,8 +711,6 @@ void upper_layers_down(ppp_pcb *pcb) {
const struct protent *protp;
for (i = 0; (protp = protocols[i]) != NULL; ++i) {
if (!protp->enabled_flag)
continue;
if (protp->protocol != PPP_LCP && protp->lowerdown != NULL)
(*protp->lowerdown)(pcb);
if (protp->protocol < 0xC000 && protp->close != NULL)
@@ -744,7 +742,7 @@ void link_established(ppp_pcb *pcb) {
*/
if (!doing_multilink) {
for (i = 0; (protp = protocols[i]) != NULL; ++i)
if (protp->protocol != PPP_LCP && protp->enabled_flag
if (protp->protocol != PPP_LCP
&& protp->lowerup != NULL)
(*protp->lowerup)(pcb);
}
@@ -946,7 +944,7 @@ void start_networks(ppp_pcb *pcb) {
|| protp->protocol == PPP_CCP
#endif /* CCP_SUPPORT */
)
&& protp->enabled_flag && protp->open != NULL)
&& protp->open != NULL)
(*protp->open)(pcb);
#endif /* CCP_SUPPORT || ECP_SUPPORT */
@@ -986,7 +984,7 @@ void continue_networks(ppp_pcb *pcb) {
#if ECP_SUPPORT
&& protp->protocol != PPP_ECP
#endif /* ECP_SUPPORT */
&& protp->enabled_flag && protp->open != NULL) {
&& protp->open != NULL) {
(*protp->open)(pcb);
++pcb->num_np_open;
}