diff --git a/core/net/rime/rimestats.h b/core/net/rime/rimestats.h index d40c9b684..abdc509de 100644 --- a/core/net/rime/rimestats.h +++ b/core/net/rime/rimestats.h @@ -55,12 +55,15 @@ struct rimestats { unsigned long lltx, llrx; }; +#if RIMESTATS_CONF_ENABLED +/* Don't access this variable directly, use RIMESTATS_ADD and RIMESTATS_GET */ extern struct rimestats rimestats; -#if RIMESTATS_CONF_ENABLED #define RIMESTATS_ADD(x) rimestats.x++ +#define RIMESTATS_GET(x) rimestats.x #else /* RIMESTATS_CONF_ENABLED */ #define RIMESTATS_ADD(x) +#define RIMESTATS_GET(x) 0 #endif /* RIMESTATS_CONF_ENABLED */ #endif /* __RIMESTATS_H__ */