diff options
-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" |