diff options
Diffstat (limited to 'libglusterfs')
-rw-r--r-- | libglusterfs/src/glusterfs/logging.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libglusterfs/src/glusterfs/logging.h b/libglusterfs/src/glusterfs/logging.h index c81e19bef32..3655b1d11bd 100644 --- a/libglusterfs/src/glusterfs/logging.h +++ b/libglusterfs/src/glusterfs/logging.h @@ -300,7 +300,7 @@ _gf_log_eh(const char *function, const char *fmt, ...) /* Log once in GF_UNIVERSAL_ANSWER times */ #define GF_LOG_OCCASIONALLY(var, args...) \ - if (!(var++ % GF_UNIVERSAL_ANSWER)) { \ + if (var++ == 0 || !((var - 1) % GF_UNIVERSAL_ANSWER)) { \ gf_log(args); \ } |