projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #1856 from rubenk/snmp-dont-dispatch-values-with-empty-type-instance
[collectd.git]
/
src
/
target_notification.c
diff --git
a/src/target_notification.c
b/src/target_notification.c
index
59d8c94
..
21c071e
100644
(file)
--- a/
src/target_notification.c
+++ b/
src/target_notification.c
@@
-125,7
+125,6
@@
static int tn_create (const oconfig_item_t *ci, void **user_data) /* {{{ */
{
tn_data_t *data;
int status;
{
tn_data_t *data;
int status;
- int i;
data = calloc (1, sizeof (*data));
if (data == NULL)
data = calloc (1, sizeof (*data));
if (data == NULL)
@@
-138,7
+137,7
@@
static int tn_create (const oconfig_item_t *ci, void **user_data) /* {{{ */
data->severity = 0;
status = 0;
data->severity = 0;
status = 0;
- for (i = 0; i < ci->children_num; i++)
+ for (i
nt i
= 0; i < ci->children_num; i++)
{
oconfig_item_t *child = ci->children + i;
{
oconfig_item_t *child = ci->children + i;
@@
-199,8
+198,6
@@
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;
- size_t i;
-
if ((ds == NULL) || (vl == NULL) || (user_data == NULL))
return (-EINVAL);
if ((ds == NULL) || (vl == NULL) || (user_data == NULL))
return (-EINVAL);
@@
-235,7
+232,8
@@
static int tn_invoke (const data_set_t *ds, value_list_t *vl, /* {{{ */
rates_failed = 0;
rates = NULL;
rates_failed = 0;
rates = NULL;
- for (i = 0; i < ds->ds_num; i++)
+
+ for (size_t i = 0; i < ds->ds_num; i++)
{
char template[DATA_MAX_NAME_LEN];
char value_str[DATA_MAX_NAME_LEN];
{
char template[DATA_MAX_NAME_LEN];
char value_str[DATA_MAX_NAME_LEN];