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