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
/
target_notification.c
diff --git
a/src/target_notification.c
b/src/target_notification.c
index
ceb454e
..
55b72ac
100644
(file)
--- a/
src/target_notification.c
+++ b/
src/target_notification.c
@@
-126,13
+126,12
@@
static int tn_create (const oconfig_item_t *ci, void **user_data) /* {{{ */
int status;
int i;
int status;
int i;
- data =
(tn_data_t *) malloc (
sizeof (*data));
+ data =
calloc (1,
sizeof (*data));
if (data == NULL)
{
if (data == NULL)
{
- ERROR ("tn_create:
m
alloc failed.");
+ ERROR ("tn_create:
c
alloc failed.");
return (-ENOMEM);
}
return (-ENOMEM);
}
- memset (data, 0, sizeof (*data));
data->message = NULL;
data->severity = 0;
data->message = NULL;
data->severity = 0;
@@
-199,7
+198,7
@@
static int tn_invoke (const data_set_t *ds, value_list_t *vl, /* {{{ */
gauge_t *rates;
int rates_failed;
gauge_t *rates;
int rates_failed;
-
in
t i;
+
size_
t i;
if ((ds == NULL) || (vl == NULL) || (user_data == NULL))
return (-EINVAL);
if ((ds == NULL) || (vl == NULL) || (user_data == NULL))
return (-EINVAL);