[collectd] [PATCH] - simplified heartbeat calculation

bd at bc-bd.org bd at bc-bd.org
Mon Feb 25 20:14:19 CET 2008


Looks simpler, should do the same.

---
 src/rrdtool.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/src/rrdtool.c b/src/rrdtool.c
index 65acbe3..07ea84b 100644
--- a/src/rrdtool.c
+++ b/src/rrdtool.c
@@ -1110,12 +1110,7 @@ static int rrd_init (void)
 	if (stepsize < 0)
 		stepsize = 0;
 	if (heartbeat <= 0)
-	{
-		if (stepsize > 0)
-			heartbeat = 2 * stepsize;
-		else
-			heartbeat = 0;
-	}
+		heartbeat = 2 * stepsize;
 
 	if ((heartbeat > 0) && (heartbeat < interval_g))
 		WARNING ("rrdtool plugin: Your `heartbeat' is "
-- 
1.4.4.4




More information about the collectd mailing list