From 913e868e18f756199ed1ea5365ff7fb1a72eeedc Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Tue, 21 Aug 2012 16:02:23 +0000 Subject: [PATCH] - don't show on empty data --- src/mesh/gnunet-service-mesh.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- 2.25.1