X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fcsv.c;h=15494f450dd60a852be2b948c8356c781194c2e1;hb=20d15cfd26b23508242abcead906207bf26175d0;hp=f123c5d6dae1960d6fe91a53c16765d27eda4356;hpb=44dcf2017576cbd398574ac66a732a5d2b179c3c;p=collectd.git diff --git a/src/csv.c b/src/csv.c index f123c5d6..15494f45 100644 --- a/src/csv.c +++ b/src/csv.c @@ -17,7 +17,7 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * Authors: - * Florian octo Forster + * Florian octo Forster * Doug MacEachern **/ @@ -25,7 +25,6 @@ #include "plugin.h" #include "common.h" #include "utils_cache.h" -#include "utils_parse_option.h" /* * Private variables @@ -46,7 +45,7 @@ static int value_list_to_string (char *buffer, int buffer_len, { int offset; int status; - int i; + size_t i; gauge_t *rates = NULL; assert (0 == strcmp (ds->type, vl->type)); @@ -185,7 +184,7 @@ static int value_list_to_filename (char *buffer, size_t buffer_size, static int csv_create_file (const char *filename, const data_set_t *ds) { FILE *csv; - int i; + size_t i; if (check_create_dir (filename)) return (-1); @@ -215,7 +214,10 @@ static int csv_config (const char *key, const char *value) if (strcasecmp ("DataDir", key) == 0) { if (datadir != NULL) + { free (datadir); + datadir = NULL; + } if (strcasecmp ("stdout", value) == 0) { use_stdio = 1;