diff --git a/src/rrd_cgi.c b/src/rrd_cgi.c
index f6313f869dc0cc725e39e9107283a275571b8a8b..1fabe705a5a8d46d4fef7e64cd44b3b9a96d8165 100644 (file)
--- a/src/rrd_cgi.c
+++ b/src/rrd_cgi.c
if (buf == NULL) {
return stralloc("[ERROR: allocating strftime buffer]");
};
- last = rrd_last(argc + 1, (char **) args - 1);
+ /* not raising argc in step with args - 1 since the last argument
+ will be used below for strftime */
+
+ last = rrd_last(argc, (char **) args - 1);
if (rrd_test_error()) {
char *err =
malloc((strlen(rrd_get_error()) +
strftime(buf, 254, args[1], &tm_last);
return buf;
}
- if (argc < 2) {
- return stralloc("[ERROR: too few arguments for RRD::TIME::LAST]");
- }
- return stralloc("[ERROR: not enough arguments for RRD::TIME::LAST]");
+ return stralloc("[ERROR: expected <RRD::TIME::LAST file.rrd strftime-format>]");
}
char *printtimenow(