diff options
author | Brant Thomsen <brant.thomsen@harman.com> | 2017-08-22 09:18:31 -0600 |
---|---|---|
committer | Brant Thomsen <brant.thomsen@harman.com> | 2017-08-22 10:08:00 -0600 |
commit | 2fadfc06453cdd363c7038e2549a7b210ad5bcae (patch) | |
tree | d66c30fa8a64299a0c8f7ed55d4e9e2f2bbd97cd | |
parent | b6910749684f3604d91da15f334379c0d2eaf932 (diff) | |
download | Open-AVB-2fadfc06453cdd363c7038e2549a7b210ad5bcae.tar.gz |
IF_LOG_INTERVAL interval count fix.
-rw-r--r-- | daemons/maap/common/maap_log.h | 2 | ||||
-rw-r--r-- | daemons/shaper/src/shaper_log.h | 2 | ||||
-rw-r--r-- | lib/avtp_pipeline/include/openavb_log_pub.h | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/daemons/maap/common/maap_log.h b/daemons/maap/common/maap_log.h index bb421c7b..eb9ca01f 100644 --- a/daemons/maap/common/maap_log.h +++ b/daemons/maap/common/maap_log.h @@ -166,7 +166,7 @@ typedef enum { #define IF_LOG_ONCE() static uint32_t LOG_VAR(logOnce,__LINE__) = 0; if (!LOG_VAR(logOnce,__LINE__)++) // Log a message at an interval. Usage: IF_LOG_INTERVAL(100) MAAP_LOG_INFO(...) -#define IF_LOG_INTERVAL(x) static uint32_t LOG_VAR(logOnce,__LINE__) = 0; if (!(LOG_VAR(logOnce,__LINE__)++ % (x - 1))) +#define IF_LOG_INTERVAL(x) static uint32_t LOG_VAR(logOnce,__LINE__) = 0; if (!(LOG_VAR(logOnce,__LINE__)++ % (x))) #define ETH_FORMAT "%02x:%02x:%02x:%02x:%02x:%02x" diff --git a/daemons/shaper/src/shaper_log.h b/daemons/shaper/src/shaper_log.h index 6c7d987b..0db3dc36 100644 --- a/daemons/shaper/src/shaper_log.h +++ b/daemons/shaper/src/shaper_log.h @@ -166,7 +166,7 @@ typedef enum { #define IF_LOG_ONCE() static uint32_t LOG_VAR(logOnce,__LINE__) = 0; if (!LOG_VAR(logOnce,__LINE__)++) // Log a message at an interval. Usage: IF_LOG_INTERVAL(100) SHAPER_LOG_INFO(...) -#define IF_LOG_INTERVAL(x) static uint32_t LOG_VAR(logOnce,__LINE__) = 0; if (!(LOG_VAR(logOnce,__LINE__)++ % (x - 1))) +#define IF_LOG_INTERVAL(x) static uint32_t LOG_VAR(logOnce,__LINE__) = 0; if (!(LOG_VAR(logOnce,__LINE__)++ % (x))) #define ETH_FORMAT "%02x:%02x:%02x:%02x:%02x:%02x" diff --git a/lib/avtp_pipeline/include/openavb_log_pub.h b/lib/avtp_pipeline/include/openavb_log_pub.h index 47b0bbbe..846c169e 100644 --- a/lib/avtp_pipeline/include/openavb_log_pub.h +++ b/lib/avtp_pipeline/include/openavb_log_pub.h @@ -164,7 +164,7 @@ typedef enum { #define IF_LOG_ONCE() static U32 LOG_VAR(logOnce,__LINE__) = 0; if (!LOG_VAR(logOnce,__LINE__)++) // Log a message at an interval. Usage: IF_LOG_INTERVAL(100) AVB_LOG_INFO(...) -#define IF_LOG_INTERVAL(x) static U32 LOG_VAR(logOnce,__LINE__) = 0; if (!(LOG_VAR(logOnce,__LINE__)++ % (x - 1))) +#define IF_LOG_INTERVAL(x) static U32 LOG_VAR(logOnce,__LINE__) = 0; if (!(LOG_VAR(logOnce,__LINE__)++ % (x))) #define ETH_FORMAT "%02x:%02x:%02x:%02x:%02x:%02x" |