projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
af512f0
)
postgresql plugin: constify
author
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Sat, 5 Mar 2016 13:50:35 +0000
(14:50 +0100)
committer
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Sat, 5 Mar 2016 13:50:35 +0000
(14:50 +0100)
src/postgresql.c
patch
|
blob
|
history
diff --git
a/src/postgresql.c
b/src/postgresql.c
index
87a56b7
..
7922683
100644
(file)
--- a/
src/postgresql.c
+++ b/
src/postgresql.c
@@
-154,7
+154,7
@@
typedef struct {
int ref_cnt;
} c_psql_database_t;
int ref_cnt;
} c_psql_database_t;
-static c
har *
def_queries[] = {
+static c
onst char *const
def_queries[] = {
"backends",
"transactions",
"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)
{
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;
+ c
onst c
har *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));
if ((data == NULL) || (data->params_num == 0))
return (c_psql_exec_query_noparams (db, q));