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
/
curl_xml.c
diff --git
a/src/curl_xml.c
b/src/curl_xml.c
index
39d6fd0
..
ab18b78
100644
(file)
--- a/
src/curl_xml.c
+++ b/
src/curl_xml.c
@@
-686,7
+686,7
@@
static int cx_config_add_values (const char *name, cx_xpath_t *xpath, /* {{{ */
sfree (xpath->values);
xpath->values_len = 0;
sfree (xpath->values);
xpath->values_len = 0;
- xpath->values =
(cx_values_t *)
malloc (sizeof (cx_values_t) * ci->values_num);
+ xpath->values = malloc (sizeof (cx_values_t) * ci->values_num);
if (xpath->values == NULL)
return (-1);
xpath->values_len = (size_t) ci->values_num;
if (xpath->values == NULL)
return (-1);
xpath->values_len = (size_t) ci->values_num;
@@
-873,7
+873,7
@@
static int cx_init_curl (cx_t *db) /* {{{ */
if (db->pass != NULL)
credentials_size += strlen (db->pass);
if (db->pass != NULL)
credentials_size += strlen (db->pass);
- db->credentials =
(char *)
malloc (credentials_size);
+ db->credentials = malloc (credentials_size);
if (db->credentials == NULL)
{
ERROR ("curl_xml plugin: malloc failed.");
if (db->credentials == NULL)
{
ERROR ("curl_xml plugin: malloc failed.");
@@
-923,7
+923,7
@@
static int cx_config_add_url (oconfig_item_t *ci) /* {{{ */
return (-1);
}
return (-1);
}
- db =
(cx_t *)
malloc (sizeof (*db));
+ db = malloc (sizeof (*db));
if (db == NULL)
{
ERROR ("curl_xml plugin: malloc failed.");
if (db == NULL)
{
ERROR ("curl_xml plugin: malloc failed.");