projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into f/riemann/rcc
[collectd.git]
/
src
/
powerdns.c
diff --git
a/src/powerdns.c
b/src/powerdns.c
index
ab62dcf
..
1c41ff8
100644
(file)
--- a/
src/powerdns.c
+++ b/
src/powerdns.c
@@
-465,7
+465,7
@@
static int powerdns_get_data_dgram (list_item_t *item, /* {{{ */
return (-1);
assert (buffer_size > 0);
return (-1);
assert (buffer_size > 0);
- buffer =
(char *)
malloc (buffer_size);
+ buffer = malloc (buffer_size);
if (buffer == NULL)
{
FUNC_ERROR ("malloc");
if (buffer == NULL)
{
FUNC_ERROR ("malloc");
@@
-840,13
+840,12
@@
static int powerdns_config_add_server (oconfig_item_t *ci) /* {{{ */
return (-1);
}
return (-1);
}
- item =
(list_item_t *) malloc (sizeof (list_item_t
));
+ item =
calloc (1, sizeof (*item
));
if (item == NULL)
{
if (item == NULL)
{
- ERROR ("powerdns plugin:
m
alloc failed.");
+ ERROR ("powerdns plugin:
c
alloc failed.");
return (-1);
}
return (-1);
}
- memset (item, '\0', sizeof (list_item_t));
item->instance = strdup (ci->values[0].value.string);
if (item->instance == NULL)
item->instance = strdup (ci->values[0].value.string);
if (item->instance == NULL)