Code

rrdtool plugin: Simplified heartbeat calculation
authorStefan Völkel <bd@bc-bd.org>
Mon, 25 Feb 2008 19:14:19 +0000 (20:14 +0100)
committerFlorian Forster <octo@huhu.verplant.org>
Tue, 26 Feb 2008 11:19:54 +0000 (12:19 +0100)
Looks simpler, should do the same.

Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/rrdtool.c

index 024b04e5e928a11daaeb6edb31d0a985a8c1af4d..3bb5a9e7ede71ed45b87f09fa3dd2424a305b850 100644 (file)
@@ -1099,12 +1099,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 "