From: Bart Polot Date: Tue, 21 Aug 2012 16:02:23 +0000 (+0000) Subject: - don't show on empty data X-Git-Tag: initial-import-from-subversion-38251~12149 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=913e868e18f756199ed1ea5365ff7fb1a72eeedc;p=oweals%2Fgnunet.git - don't show on empty data --- diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index 3f8dba822..2189d611d 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c @@ -88,7 +88,9 @@ do {\ __sum += __diff;\ __count++;\ } while (0) -#define INTERVAL_SHOW GNUNET_log (GNUNET_ERROR_TYPE_INFO, "AVG process time: %f ns\n", __sum/__count) +#define INTERVAL_SHOW \ +if (0 < __count)\ + GNUNET_log (GNUNET_ERROR_TYPE_INFO, "AVG process time: %f ns\n", __sum/__count) #else #define INTERVAL_START #define INTERVAL_END