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 024b04e..3bb5a9e 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 "