From 979097128af0f9ee8be2b553c92b66e2934a359b Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Thu, 3 Jul 2008 22:59:33 +0200 Subject: [PATCH] rrdcached plugin: Use ".rrd" as suffix, not the current date. --- src/rrdcached.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/src/rrdcached.c b/src/rrdcached.c index bdfe4552..fef78ce4 100644 --- a/src/rrdcached.c +++ b/src/rrdcached.c @@ -123,22 +123,8 @@ static int value_list_to_filename (char *buffer, int buffer_len, 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 */ -- 2.30.2