]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
Fixed ending time as well (behaviour was different but corner case was the same:...
authorEduardo Bragatto <eduardo@bragatto.com>
Tue, 18 Nov 2014 00:01:20 +0000 (22:01 -0200)
committerEduardo Bragatto <eduardo@bragatto.com>
Tue, 18 Nov 2014 00:01:20 +0000 (22:01 -0200)
src/rrd_xport.c

index adc4078c246b3745bc1878ec3b064eb8a22a42b6..3daffa2bc19bde2ce1c1a97ac1ff65973e3f6f45 100644 (file)
@@ -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 */