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
/
aggregation.c
diff --git
a/src/aggregation.c
b/src/aggregation.c
index
84df548
..
b9db500
100644
(file)
--- a/
src/aggregation.c
+++ b/
src/aggregation.c
@@
-337,7
+337,7
@@
static int agg_instance_read_func (agg_instance_t *inst, /* {{{ */
char const *func, gauge_t rate, rate_to_value_state_t *state,
value_list_t *vl, char const *pi_prefix, cdtime_t t)
{
char const *func, gauge_t rate, rate_to_value_state_t *state,
value_list_t *vl, char const *pi_prefix, cdtime_t t)
{
- value_t v
= { 0 }
;
+ value_t v;
int status;
if (pi_prefix[0] != 0)
int status;
if (pi_prefix[0] != 0)
@@
-483,9
+483,7
@@
static void agg_lookup_free_obj_callback (void *user_obj) /* {{{ */
static int agg_config_handle_group_by (oconfig_item_t const *ci, /* {{{ */
aggregation_t *agg)
{
static int agg_config_handle_group_by (oconfig_item_t const *ci, /* {{{ */
aggregation_t *agg)
{
- int i;
-
- for (i = 0; i < ci->values_num; i++)
+ for (int i = 0; i < ci->values_num; i++)
{
char const *value;
{
char const *value;
@@
-521,7
+519,6
@@
static int agg_config_aggregation (oconfig_item_t *ci) /* {{{ */
aggregation_t *agg;
_Bool is_valid;
int status;
aggregation_t *agg;
_Bool is_valid;
int status;
- int i;
agg = calloc (1, sizeof (*agg));
if (agg == NULL)
agg = calloc (1, sizeof (*agg));
if (agg == NULL)
@@
-538,7
+535,7
@@
static int agg_config_aggregation (oconfig_item_t *ci) /* {{{ */
sstrncpy (agg->ident.type_instance, "/.*/",
sizeof (agg->ident.type_instance));
sstrncpy (agg->ident.type_instance, "/.*/",
sizeof (agg->ident.type_instance));
- 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;
@@
-676,8
+673,6
@@
static int agg_config_aggregation (oconfig_item_t *ci) /* {{{ */
static int agg_config (oconfig_item_t *ci) /* {{{ */
{
static int agg_config (oconfig_item_t *ci) /* {{{ */
{
- int i;
-
pthread_mutex_lock (&agg_instance_list_lock);
if (lookup == NULL)
pthread_mutex_lock (&agg_instance_list_lock);
if (lookup == NULL)
@@
-694,7
+689,7
@@
static int agg_config (oconfig_item_t *ci) /* {{{ */
}
}
}
}
- 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;
@@
-712,7
+707,6
@@
static int agg_config (oconfig_item_t *ci) /* {{{ */
static int agg_read (void) /* {{{ */
{
static int agg_read (void) /* {{{ */
{
- agg_instance_t *this;
cdtime_t t;
int success;
cdtime_t t;
int success;
@@
-733,7
+727,7
@@
static int agg_read (void) /* {{{ */
return (0);
}
return (0);
}
- for (this = agg_instance_list_head; this != NULL; this = this->next)
+ for (
agg_instance_t *
this = agg_instance_list_head; this != NULL; this = this->next)
{
int status;
{
int status;