From: 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-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e97c3999fd36fe66b7a1ff4a70fe1726f77b615c;p=rrdtool.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 59f17c1..1ac392f 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