From: Eduardo Bragatto Date: Tue, 18 Nov 2014 00:01:20 +0000 (-0200) Subject: Fixed ending time as well (behaviour was different but corner case was the same:... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=20d7bd28bbb7c09e5b277aacf43605eb2f65f285;p=thirdparty%2Frrdtool-1.x.git Fixed ending time as well (behaviour was different but corner case was the same: when start ou end times were exact multiples of step) --- diff --git a/src/rrd_xport.c b/src/rrd_xport.c index adc4078c..3daffa2b 100644 --- a/src/rrd_xport.c +++ b/src/rrd_xport.c @@ -289,7 +289,10 @@ int rrd_xport_fn( if ( im->start > *start ) { *start = *start + *step; } - *end = im->end - im->end % (*step) + (*step); + *end = im->end - im->end % (*step); + if ( im->end > *end ) { + *end = *end + *step; + } /* room for rearranged data */