Use LINK_STATS_INC instead of #if LINK_STATS...

This commit is contained in:
goldsimon 2007-11-28 21:15:55 +00:00
parent 6e612e5def
commit 7f3cff6e09

View File

@ -145,9 +145,7 @@ low_level_output(struct netif *netif, struct pbuf *p)
pbuf_header(p, ETH_PAD_SIZE); /* reclaim the padding word */ pbuf_header(p, ETH_PAD_SIZE); /* reclaim the padding word */
#endif #endif
#if LINK_STATS LINK_STATS_INC(link.xmit);
lwip_stats.link.xmit++;
#endif /* LINK_STATS */
return ERR_OK; return ERR_OK;
} }
@ -198,15 +196,11 @@ low_level_input(struct netif *netif)
pbuf_header(p, ETH_PAD_SIZE); /* reclaim the padding word */ pbuf_header(p, ETH_PAD_SIZE); /* reclaim the padding word */
#endif #endif
#if LINK_STATS LINK_STATS_INC(link.recv);
lwip_stats.link.recv++;
#endif /* LINK_STATS */
} else { } else {
drop packet(); drop packet();
#if LINK_STATS LINK_STATS_INC(link.memerr);
lwip_stats.link.memerr++; LINK_STATS_INC(link.drop);
lwip_stats.link.drop++;
#endif /* LINK_STATS */
} }
return p; return p;