summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0fdc8c0)
raw | patch | inline | side by side (parent: 0fdc8c0)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 18 Sep 2005 16:59:34 +0000 (16:59 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 18 Sep 2005 16:59:34 +0000 (16:59 +0000) |
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@683 a5681a0c-68f1-0310-ab6d-d61299d08faa
src/rrd_fetch.c | patch | blob | history |
diff --git a/src/rrd_fetch.c b/src/rrd_fetch.c
index 9bcaeb18f6978a0653019e401aed7528bed9f57c..e6590ec74c98dab7388486ba536903523d4c9669 100644 (file)
--- a/src/rrd_fetch.c
+++ b/src/rrd_fetch.c
int first_part = 1;
rrd_t rrd;
rrd_value_t *data_ptr;
- unsigned long rows = (*end - *start) / *step;
+ unsigned long rows;
#ifdef DEBUG
fprintf(stderr,"Entered rrd_fetch_fn() searching for the best match\n");
-fprintf(stderr,"Looking for: start %10lu end %10lu step %5lu rows %lu\n",
- *start,*end,*step,rows);
+fprintf(stderr,"Looking for: start %10lu end %10lu step %5lu\n",
+ *start,*end,*step);
#endif
if(rrd_open(filename,&in_file,&rrd, RRD_READONLY)==-1)
*step = rrd.stat_head->pdp_step * rrd.rra_def[chosen_rra].pdp_cnt;
*start -= (*start % *step);
if (*end % *step) *end += (*step - *end % *step);
- rows = (*end - *start) / *step;
+ rows = (*end - *start) / *step + 1;
#ifdef DEBUG
fprintf(stderr,"We found: start %10lu end %10lu step %5lu rows %lu\n",