From: Tobias Oetiker Date: Thu, 4 May 2006 12:11:09 +0000 (+0000) Subject: if end % step == 0 we should still fetch a full step ... no need X-Git-Tag: 1.2.13~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=535cdbd07816c90de145351901e1a241f1be035b;p=thirdparty%2Frrdtool-1.x.git if end % step == 0 we should still fetch a full step ... no need for special handling git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@809 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/src/rrd_fetch.c b/src/rrd_fetch.c index 59f17c17..1ac392f5 100644 --- a/src/rrd_fetch.c +++ b/src/rrd_fetch.c @@ -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