summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e8c7185)
raw | patch | inline | side by side (parent: e8c7185)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sat, 31 May 2008 12:28:11 +0000 (12:28 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sat, 31 May 2008 12:28:11 +0000 (12:28 +0000) |
src/rrd_graph.c | patch | blob | history |
diff --git a/src/rrd_graph.c b/src/rrd_graph.c
index 480041f9f8d89a117a5c8f65831ddfcfd39fb82b..760e3a342e047492792d38541b7869132feceb00 100644 (file)
--- a/src/rrd_graph.c
+++ b/src/rrd_graph.c
graph_desc_t *src, *dst;
rrd_value_t *data;
long step, steps;
+ unsigned long end;
dst = &im->gdes[gdi];
src = &im->gdes[dst->vidx];
data = src->data + src->ds;
- steps = (src->end - src->start) / src->step;
+ end = src->end_orig % src->step == 0 ? src->end_orig : (src->end_orig + src->step - src->end_orig % src->step);
+
+ steps = (end - src->start) / src->step;
#if 0
printf
("DEBUG: start == %lu, end == %lu, %lu steps\n",
- src->start, src->end, steps);
+ src->start, src->end_orig, steps);
#endif
switch (dst->vf.op) {
case VDEF_PERCENT:{