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
/
write_mongodb.c
diff --git
a/src/write_mongodb.c
b/src/write_mongodb.c
index
8d9ed9d
..
8fb13c3
100644
(file)
--- a/
src/write_mongodb.c
+++ b/
src/write_mongodb.c
@@
-76,7
+76,6
@@
static bson *wm_create_bson (const data_set_t *ds, /* {{{ */
{
bson *ret;
gauge_t *rates;
{
bson *ret;
gauge_t *rates;
- int i;
ret = bson_alloc (); /* matched by bson_dealloc() */
if (ret == NULL)
ret = bson_alloc (); /* matched by bson_dealloc() */
if (ret == NULL)
@@
-108,7
+107,7
@@
static bson *wm_create_bson (const data_set_t *ds, /* {{{ */
bson_append_string (ret, "type_instance", vl->type_instance);
bson_append_start_array (ret, "values"); /* {{{ */
bson_append_string (ret, "type_instance", vl->type_instance);
bson_append_start_array (ret, "values"); /* {{{ */
- for (i = 0; i < ds->ds_num; i++)
+ for (i
nt i
= 0; i < ds->ds_num; i++)
{
char key[16];
{
char key[16];
@@
-130,7
+129,7
@@
static bson *wm_create_bson (const data_set_t *ds, /* {{{ */
bson_append_finish_array (ret); /* }}} values */
bson_append_start_array (ret, "dstypes"); /* {{{ */
bson_append_finish_array (ret); /* }}} values */
bson_append_start_array (ret, "dstypes"); /* {{{ */
- for (i = 0; i < ds->ds_num; i++)
+ for (i
nt i
= 0; i < ds->ds_num; i++)
{
char key[16];
{
char key[16];
@@
-144,7
+143,7
@@
static bson *wm_create_bson (const data_set_t *ds, /* {{{ */
bson_append_finish_array (ret); /* }}} dstypes */
bson_append_start_array (ret, "dsnames"); /* {{{ */
bson_append_finish_array (ret); /* }}} dstypes */
bson_append_start_array (ret, "dsnames"); /* {{{ */
- for (i = 0; i < ds->ds_num; i++)
+ for (i
nt i
= 0; i < ds->ds_num; i++)
{
char key[16];
{
char key[16];
@@
-271,7
+270,6
@@
static int wm_config_node (oconfig_item_t *ci) /* {{{ */
{
wm_node_t *node;
int status;
{
wm_node_t *node;
int status;
- int i;
node = calloc (1, sizeof (*node));
if (node == NULL)
node = calloc (1, sizeof (*node));
if (node == NULL)
@@
-289,7
+287,7
@@
static int wm_config_node (oconfig_item_t *ci) /* {{{ */
return (status);
}
return (status);
}
- 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;
@@
-358,9
+356,7
@@
static int wm_config_node (oconfig_item_t *ci) /* {{{ */
static int wm_config (oconfig_item_t *ci) /* {{{ */
{
static int wm_config (oconfig_item_t *ci) /* {{{ */
{
- int i;
-
- for (i = 0; i < ci->children_num; i++)
+ for (int i = 0; i < ci->children_num; i++)
{
oconfig_item_t *child = ci->children + i;
{
oconfig_item_t *child = ci->children + i;