projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Treewide: cleanup whitespace
[collectd.git]
/
src
/
match_empty_counter.c
diff --git
a/src/match_empty_counter.c
b/src/match_empty_counter.c
index
e30ff91
..
8f99a6d
100644
(file)
--- a/
src/match_empty_counter.c
+++ b/
src/match_empty_counter.c
@@
-46,13
+46,12
@@
static int mec_create (const oconfig_item_t *ci, void **user_data) /* {{{ */
{
mec_match_t *m;
{
mec_match_t *m;
- m =
(mec_match_t *) malloc (
sizeof (*m));
+ m =
calloc (1,
sizeof (*m));
if (m == NULL)
{
if (m == NULL)
{
- ERROR ("mec_create:
m
alloc failed.");
+ ERROR ("mec_create:
c
alloc failed.");
return (-ENOMEM);
}
return (-ENOMEM);
}
- memset (m, 0, sizeof (*m));
if (ci->children_num != 0)
{
if (ci->children_num != 0)
{