projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
treewide: cleanup malloc calls
[collectd.git]
/
src
/
utils_db_query.c
diff --git
a/src/utils_db_query.c
b/src/utils_db_query.c
index
d2b8117
..
d003e7f
100644
(file)
--- a/
src/utils_db_query.c
+++ b/
src/utils_db_query.c
@@
-550,7
+550,7
@@
static int udb_result_create (const char *query_name, /* {{{ */
ci->values_num, (ci->values_num == 1) ? "" : "s");
}
ci->values_num, (ci->values_num == 1) ? "" : "s");
}
- r =
(udb_result_t *)
malloc (sizeof (*r));
+ r = malloc (sizeof (*r));
if (r == NULL)
{
ERROR ("db query utils: malloc failed.");
if (r == NULL)
{
ERROR ("db query utils: malloc failed.");
@@
-638,7
+638,7
@@
static int udb_result_create (const char *query_name, /* {{{ */
/*
* Query private functions
*/
/*
* Query private functions
*/
-void udb_query_free_one (udb_query_t *q) /* {{{ */
+
static
void udb_query_free_one (udb_query_t *q) /* {{{ */
{
if (q == NULL)
return;
{
if (q == NULL)
return;
@@
-678,7
+678,7
@@
int udb_query_create (udb_query_t ***ret_query_list, /* {{{ */
return (-1);
}
return (-1);
}
- q =
(udb_query_t *)
malloc (sizeof (*q));
+ q = malloc (sizeof (*q));
if (q == NULL)
{
ERROR ("db query utils: malloc failed.");
if (q == NULL)
{
ERROR ("db query utils: malloc failed.");