projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
utils_cache_mock: fix annotations
[collectd.git]
/
src
/
dbi.c
diff --git
a/src/dbi.c
b/src/dbi.c
index
7dec51a
..
273cce8
100644
(file)
--- a/
src/dbi.c
+++ b/
src/dbi.c
@@
-148,7
+148,7
@@
static int cdbi_result_get_field (dbi_result res, /* {{{ */
else if (src_type == DBI_TYPE_STRING)
{
const char *value;
else if (src_type == DBI_TYPE_STRING)
{
const char *value;
-
+
value = dbi_result_get_string_idx (res, index);
if (value == NULL)
sstrncpy (buffer, "", buffer_size);
value = dbi_result_get_string_idx (res, index);
if (value == NULL)
sstrncpy (buffer, "", buffer_size);
@@
-214,7
+214,7
@@
static void cdbi_database_free (cdbi_database_t *db) /* {{{ */
* </Result>
* ...
* </Query>
* </Result>
* ...
* </Query>
- *
+ *
* <Database "plugin_instance1">
* Driver "mysql"
* Interval 120
* <Database "plugin_instance1">
* Driver "mysql"
* Interval 120
@@
-240,7
+240,7
@@
static int cdbi_config_add_database_driver_option (cdbi_database_t *db, /* {{{ *
return (-1);
}
return (-1);
}
- option =
(cdbi_driver_option_t *)
realloc (db->driver_options,
+ option = realloc (db->driver_options,
sizeof (*option) * (db->driver_options_num + 1));
if (option == NULL)
{
sizeof (*option) * (db->driver_options_num + 1));
if (option == NULL)
{
@@
-386,7
+386,7
@@
static int cdbi_config_add_database (oconfig_item_t *ci) /* {{{ */
{
cdbi_database_t **temp;
{
cdbi_database_t **temp;
- temp =
(cdbi_database_t **)
realloc (databases,
+ temp = realloc (databases,
sizeof (*databases) * (databases_num + 1));
if (temp == NULL)
{
sizeof (*databases) * (databases_num + 1));
if (temp == NULL)
{
@@
-510,7
+510,6
@@
static int cdbi_read_database_query (cdbi_database_t *db, /* {{{ */
column_names = NULL;
column_values = NULL;
column_names = NULL;
column_values = NULL;
- res = NULL;
statement = udb_query_get_statement (q);
assert (statement != NULL);
statement = udb_query_get_statement (q);
assert (statement != NULL);