summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 667bcda)
raw | patch | inline | side by side (parent: 667bcda)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Thu, 3 Jul 2008 20:59:33 +0000 (22:59 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Thu, 24 Jul 2008 08:10:10 +0000 (10:10 +0200) |
src/rrdcached.c | patch | blob | history |
diff --git a/src/rrdcached.c b/src/rrdcached.c
index bdfe455233ec1e9d53afb6cf2e8c95adea0111da..fef78ce42cad94cc8d640b5df6947d330d84a4fd 100644 (file)
--- a/src/rrdcached.c
+++ b/src/rrdcached.c
return (-1);
offset += status;
- {
- time_t now;
- struct tm stm;
-
- /* TODO: Find a way to minimize the calls to `localtime_r',
- * since they are pretty expensive.. */
- now = time (NULL);
- if (localtime_r (&now, &stm) == NULL)
- {
- ERROR ("rrdcached plugin: localtime_r failed");
- return (1);
- }
-
- strftime (buffer + offset, buffer_len - offset,
- "-%Y-%m-%d", &stm);
- }
+ strncpy (buffer + offset, ".rrd", buffer_len - offset);
+ buffer[buffer_len - 1] = 0;
return (0);
} /* int value_list_to_filename */