X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcsv.c;h=953473fce56a2e6a43ad2d5fa882f212556d2a2c;hb=c4439c9cb3e2348ad7013644731de27a55eca478;hp=be59ede03ef27a12373a3a07b1ea73d2f12f4e5b;hpb=07ba05937aeaedd683656c3912040950dbf4a152;p=collectd.git diff --git a/src/csv.c b/src/csv.c index be59ede0..953473fc 100644 --- a/src/csv.c +++ b/src/csv.c @@ -23,8 +23,8 @@ #include "collectd.h" -#include "common.h" #include "plugin.h" +#include "utils/common/common.h" #include "utils_cache.h" /* @@ -190,12 +190,12 @@ static int csv_config(const char *key, const char *value) { } datadir = strdup(value); if (datadir != NULL) { - int len = strlen(datadir); + size_t len = strlen(datadir); while ((len > 0) && (datadir[len - 1] == '/')) { len--; datadir[len] = '\0'; } - if (len <= 0) { + if (len == 0) { free(datadir); datadir = NULL; }