summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ad6f344)
raw | patch | inline | side by side (parent: ad6f344)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Thu, 5 Jul 2007 15:19:27 +0000 (15:19 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Thu, 5 Jul 2007 15:19:27 +0000 (15:19 +0000) |
src/rrd_graph_helper.c | patch | blob | history |
diff --git a/src/rrd_graph_helper.c b/src/rrd_graph_helper.c
index 0a6fabcb42121a9df68281dd68e49b4b2e64f438..f79a9f2f719ab2954246d0de64755453bc9ffd4d 100644 (file)
--- a/src/rrd_graph_helper.c
+++ b/src/rrd_graph_helper.c
return 1;
}
} else {
+ long time_tmp = 0;
rrd_clear_error();
i = 0;
- sscanf(&line[*eaten], "%li%n", &gdp->shval, &i);
+ sscanf(&line[*eaten], "%li%n", &time_tmp, &i);
+ gdp->shval = time_tmp;
if (i != (int) strlen(&line[*eaten])) {
rrd_set_error("Not a valid offset: %s in line %s", &line[*eaten],
line);
default:;
}
} else {
+ long time_tmp = 0;
dprintf("- it is not an existing vname\n");
switch (gdp->gf) {
case GF_VRULE:
k = 0;
- sscanf(tmpstr, "%li%n", &gdp->xrule, &k);
+ sscanf(tmpstr, "%li%n",&time_tmp , &k);
+ gdp->xrule = time_tmp;
if (((j != 0) && (k == j)) || ((j == 0) && (k == i))) {
dprintf("- found time: %li\n", gdp->xrule);
} else {
k = 0;
sscanf(tmpstr, "%lf%n", &gdp->yrule, &k);
if (((j != 0) && (k == j)) || ((j == 0) && (k == i))) {
- dprintf("- found number: %f\n", gdp->yrule);
+ dprintf("- found number: %lf\n", gdp->yrule);
} else {
- dprintf("- is is not a valid number: %li\n", gdp->xrule);
+ dprintf("- is is not a valid number: %lf\n", gdp->yrule);
rrd_set_error
("parameter '%s' does not represent a number in line %s\n",
tmpstr, line);