X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fpostgresql.c;h=62b3d5531c092b52307d8257025ecf1a5b22b840;hb=f42de42e5caa71fd8da9e79eb452ade6e9f20519;hp=b122dfe5397d53144026b0458c783517e57a2f61;hpb=7c778ae8818b949dfa5fd71b1aea7dd58e2f5e23;p=collectd.git diff --git a/src/postgresql.c b/src/postgresql.c index b122dfe5..62b3d553 100644 --- a/src/postgresql.c +++ b/src/postgresql.c @@ -547,8 +547,8 @@ static int c_psql_exec_query(c_psql_database_t *db, udb_query_t *q, status = udb_query_prepare_result( q, prep_area, host, - (db->plugin_name != NULL) ? db->plugin_name : "postgresql", - db->instance, column_names, (size_t)column_num, db->interval); + (db->plugin_name != NULL) ? db->plugin_name : "postgresql", db->instance, + column_names, (size_t)column_num, db->interval); if (0 != status) { log_err("udb_query_prepare_result failed with status %i.", status); @@ -742,7 +742,8 @@ static char *values_to_sqlarray(const data_set_t *ds, const value_list_t *vl, status = snprintf(str_ptr, str_len, ",%lf", rates[i]); } else if (ds->ds[i].type == DS_TYPE_COUNTER) - status = snprintf(str_ptr, str_len, ",%llu", vl->values[i].counter); + status = snprintf(str_ptr, str_len, ",%" PRIu64, + (uint64_t)vl->values[i].counter); else if (ds->ds[i].type == DS_TYPE_DERIVE) status = snprintf(str_ptr, str_len, ",%" PRIi64, vl->values[i].derive); else if (ds->ds[i].type == DS_TYPE_ABSOLUTE) @@ -1147,8 +1148,8 @@ static int c_psql_config_database(oconfig_item_t *ci) { cf_util_get_string(c, &db->password); else if (0 == strcasecmp(c->key, "Instance")) cf_util_get_string(c, &db->instance); - else if (0 == strcasecmp (c->key, "Plugin")) - cf_util_get_string (c, &db->plugin_name); + else if (0 == strcasecmp(c->key, "Plugin")) + cf_util_get_string(c, &db->plugin_name); else if (0 == strcasecmp(c->key, "SSLMode")) cf_util_get_string(c, &db->sslmode); else if (0 == strcasecmp(c->key, "KRBSrvName"))