X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fpostgresql.c;h=e613662ae1510893cd6df91ae6652c503e1e238f;hb=5997c2158f5712e4b67be142726b6a627582cc78;hp=1eaf6bd3877570a56c0e50c045b7e90cc888cda2;hpb=ef4a3db895a0aba7107c0f1c6c2ef2a7f128aaf8;p=collectd.git diff --git a/src/postgresql.c b/src/postgresql.c index 1eaf6bd3..e613662a 100644 --- a/src/postgresql.c +++ b/src/postgresql.c @@ -775,7 +775,7 @@ static char *values_to_sqlarray (const data_set_t *ds, const value_list_t *vl, if (ds->ds[i].type == DS_TYPE_GAUGE) status = ssnprintf (str_ptr, str_len, - ",%f", vl->values[i].gauge); + ","GAUGE_FORMAT, vl->values[i].gauge); else if (store_rates) { if (rates == NULL) rates = uc_get_rate (ds, vl); @@ -1042,7 +1042,7 @@ static int config_query_param_add (udb_query_t *q, oconfig_item_t *ci) data = udb_query_get_user_data (q); if (NULL == data) { - data = (c_psql_user_data_t *) smalloc (sizeof (*data)); + data = (c_psql_user_data_t *) malloc (sizeof (*data)); if (NULL == data) { log_err ("Out of memory."); return -1;