From 7f3cff6e0904f6dbe9b317095b40b0ad07bdb74b Mon Sep 17 00:00:00 2001 From: goldsimon Date: Wed, 28 Nov 2007 21:15:55 +0000 Subject: [PATCH] Use LINK_STATS_INC instead of #if LINK_STATS... --- src/netif/ethernetif.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/netif/ethernetif.c b/src/netif/ethernetif.c index 8c833a55..8e5cefcc 100644 --- a/src/netif/ethernetif.c +++ b/src/netif/ethernetif.c @@ -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;