From: Ruben Kerkhof Date: Sat, 5 Mar 2016 13:50:35 +0000 (+0100) Subject: postgresql plugin: constify X-Git-Tag: collectd-5.6.0~421 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=de4ccd7a8a643fcbefcf9ec235ce82c3af505878;p=collectd.git postgresql plugin: constify --- diff --git a/src/postgresql.c b/src/postgresql.c index 87a56b7f..79226830 100644 --- a/src/postgresql.c +++ b/src/postgresql.c @@ -154,7 +154,7 @@ typedef struct { int ref_cnt; } c_psql_database_t; -static char *def_queries[] = { +static const char *const def_queries[] = { "backends", "transactions", "queries", @@ -429,9 +429,9 @@ static PGresult *c_psql_exec_query_noparams (c_psql_database_t *db, static PGresult *c_psql_exec_query_params (c_psql_database_t *db, udb_query_t *q, c_psql_user_data_t *data) { - char *params[db->max_params_num]; - char interval[64]; - int i; + const char *params[db->max_params_num]; + char interval[64]; + int i; if ((data == NULL) || (data->params_num == 0)) return (c_psql_exec_query_noparams (db, q));