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
/
tail_csv.c
diff --git
a/src/tail_csv.c
b/src/tail_csv.c
index
15c083e
..
2d794fc
100644
(file)
--- a/
src/tail_csv.c
+++ b/
src/tail_csv.c
@@
-290,10
+290,9
@@
static int tcsv_config_add_metric(oconfig_item_t *ci){
int status;
int i;
int status;
int i;
- md =
malloc(
sizeof(*md));
+ md =
calloc(1,
sizeof(*md));
if (md == NULL)
return (-1);
if (md == NULL)
return (-1);
- memset(md, 0, sizeof(*md));
md->name = NULL;
md->type = NULL;
md->instance = NULL;
md->name = NULL;
md->type = NULL;
md->instance = NULL;
@@
-426,10
+425,9
@@
static int tcsv_config_add_file(oconfig_item_t *ci)
char cb_name[DATA_MAX_NAME_LEN];
user_data_t cb_data;
char cb_name[DATA_MAX_NAME_LEN];
user_data_t cb_data;
- id =
malloc(
sizeof(*id));
+ id =
calloc(1,
sizeof(*id));
if (id == NULL)
return (-1);
if (id == NULL)
return (-1);
- memset(id, 0, sizeof(*id));
id->instance = NULL;
id->path = NULL;
id->metric_list = NULL;
id->instance = NULL;
id->path = NULL;
id->metric_list = NULL;