From: Florian Forster Date: Thu, 3 Jul 2008 20:59:33 +0000 (+0200) Subject: rrdcached plugin: Use ".rrd" as suffix, not the current date. X-Git-Tag: collectd-4.6.0~209 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=979097128af0f9ee8be2b553c92b66e2934a359b;p=collectd.git rrdcached plugin: Use ".rrd" as suffix, not the current date. --- 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 */