Code

complete segfault fix for second axis %s format begun in r2123 (thanks Martin Pelikan...
[rrdtool.git] / src / rrd_xport.c
index 66cb5a1b717006ed65fd1c9de4c69ff94074f4af..e544b7d9b27a9f407e02978ae2155b5960c60583 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * RRDtool 1.3.5  Copyright by Tobi Oetiker, 1997-2008
+ * RRDtool 1.3.9  Copyright by Tobi Oetiker, 1997-2009
  ****************************************************************************
  * rrd_xport.c  export RRD data 
  ****************************************************************************/
@@ -227,7 +227,7 @@ int rrd_xport_fn(
         case GF_XPORT:
             ref_list[xport_counter++] = i;
             *step_list_ptr = im->gdes[im->gdes[i].vidx].step;
-            printf("%s:%lu\n",im->gdes[i].legend,*step_list_ptr);
+            /* printf("%s:%lu\n",im->gdes[i].legend,*step_list_ptr); */
             *step_list_ptr++;
             /* reserve room for one legend entry */
             /* is FMT_LEG_LEN + 5 the correct size? */
@@ -255,11 +255,11 @@ int rrd_xport_fn(
     *step_list_ptr=0;    
     /* find a common step */
     *step = lcd(step_list);
-    printf("step: %lu\n",*step);
+    /* printf("step: %lu\n",*step); */
     free(step_list);
     
     *start =  im->start - im->start % (*step);
-    *end = im->end - im->end % (*step);
+    *end = im->end - im->end % (*step) + (*step);
     
 
     /* room for rearranged data */