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
/
powerdns.c
diff --git
a/src/powerdns.c
b/src/powerdns.c
index
ab62dcf
..
e80ca8a
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,7
+840,7
@@
static int powerdns_config_add_server (oconfig_item_t *ci) /* {{{ */
return (-1);
}
return (-1);
}
- item =
(list_item_t *) malloc (sizeof (list_item_t
));
+ item =
malloc (sizeof (*item
));
if (item == NULL)
{
ERROR ("powerdns plugin: malloc failed.");
if (item == NULL)
{
ERROR ("powerdns plugin: malloc failed.");