X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcsv.c;h=34fc2238da1bcae7143b0da23ff8bd5127f29afa;hb=a396da422740caf336a6d594515e8d80de6f440a;hp=59d1d2fecccc24cd071aaf3d10b69353639f6465;hpb=a18496a4ac759552fd4dac1d2c661fb50285b1a1;p=collectd.git diff --git a/src/csv.c b/src/csv.c index 59d1d2fe..34fc2238 100644 --- a/src/csv.c +++ b/src/csv.c @@ -33,7 +33,7 @@ static const char *config_keys[] = {"DataDir", "StoreRates"}; static int config_keys_num = STATIC_ARRAY_SIZE(config_keys); -static char *datadir = NULL; +static char *datadir; static int store_rates = 0; static int use_stdio = 0; @@ -74,8 +74,8 @@ static int value_list_to_string(char *buffer, int buffer_len, } status = snprintf(buffer + offset, buffer_len - offset, ",%lf", rates[i]); } else if (ds->ds[i].type == DS_TYPE_COUNTER) { - status = snprintf(buffer + offset, buffer_len - offset, ",%llu", - vl->values[i].counter); + status = snprintf(buffer + offset, buffer_len - offset, ",%" PRIu64, + (uint64_t)vl->values[i].counter); } else if (ds->ds[i].type == DS_TYPE_DERIVE) { status = snprintf(buffer + offset, buffer_len - offset, ",%" PRIi64, vl->values[i].derive);