if end % step == 0 we should still fetch a full step ... no need
authoroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Thu, 4 May 2006 12:11:09 +0000 (12:11 +0000)
committeroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Thu, 4 May 2006 12:11:09 +0000 (12:11 +0000)
for special handling

git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@809 a5681a0c-68f1-0310-ab6d-d61299d08faa

src/rrd_fetch.c

index 59f17c1..1ac392f 100644 (file)
@@ -294,7 +294,7 @@ fprintf(stderr,"partial match, not best\n");
     /* set the wish parameters to their real values */
     *step = rrd.stat_head->pdp_step * rrd.rra_def[chosen_rra].pdp_cnt;
     *start -= (*start % *step);
-    if (*end % *step) *end += (*step - *end % *step);
+    *end += (*step - *end % *step);
     rows = (*end - *start) / *step + 1;
 
 #ifdef DEBUG