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
/
tail.c
diff --git
a/src/tail.c
b/src/tail.c
index
b9e9206
..
b8922ec
100644
(file)
--- a/
src/tail.c
+++ b/
src/tail.c
@@
-25,6
+25,7
@@
**/
#include "collectd.h"
**/
#include "collectd.h"
+
#include "common.h"
#include "plugin.h"
#include "utils_tail_match.h"
#include "common.h"
#include "plugin.h"
#include "utils_tail_match.h"
@@
-139,7
+140,6
@@
static int ctail_config_add_match (cu_tail_match_t *tm,
{
ctail_config_match_t cm = { 0 };
int status;
{
ctail_config_match_t cm = { 0 };
int status;
- int i;
if (ci->values_num != 0)
{
if (ci->values_num != 0)
{
@@
-147,7
+147,7
@@
static int ctail_config_add_match (cu_tail_match_t *tm,
}
status = 0;
}
status = 0;
- for (i = 0; i < ci->children_num; i++)
+ for (i
nt i
= 0; i < ci->children_num; i++)
{
oconfig_item_t *option = ci->children + i;
{
oconfig_item_t *option = ci->children + i;
@@
-222,7
+222,6
@@
static int ctail_config_add_file (oconfig_item_t *ci)
cdtime_t interval = 0;
char *plugin_instance = NULL;
int num_matches = 0;
cdtime_t interval = 0;
char *plugin_instance = NULL;
int num_matches = 0;
- int i;
if ((ci->values_num != 1) || (ci->values[0].type != OCONFIG_TYPE_STRING))
{
if ((ci->values_num != 1) || (ci->values[0].type != OCONFIG_TYPE_STRING))
{
@@
-238,7
+237,7
@@
static int ctail_config_add_file (oconfig_item_t *ci)
return (-1);
}
return (-1);
}
- for (i = 0; i < ci->children_num; i++)
+ for (i
nt i
= 0; i < ci->children_num; i++)
{
oconfig_item_t *option = ci->children + i;
int status = 0;
{
oconfig_item_t *option = ci->children + i;
int status = 0;
@@
-297,9
+296,7
@@
static int ctail_config_add_file (oconfig_item_t *ci)
static int ctail_config (oconfig_item_t *ci)
{
static int ctail_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 *option = ci->children + i;
{
oconfig_item_t *option = ci->children + i;
@@
-332,7
+329,6
@@
static int ctail_init (void)
{
char str[255];
user_data_t ud = { 0 };
{
char str[255];
user_data_t ud = { 0 };
- size_t i;
if (tail_match_list_num == 0)
{
if (tail_match_list_num == 0)
{
@@
-340,7
+336,7
@@
static int ctail_init (void)
return (-1);
}
return (-1);
}
- for (i = 0; i < tail_match_list_num; i++)
+ for (
size_t
i = 0; i < tail_match_list_num; i++)
{
ud.data = (void *)tail_match_list[i];
ssnprintf(str, sizeof(str), "tail-%zu", i);
{
ud.data = (void *)tail_match_list[i];
ssnprintf(str, sizeof(str), "tail-%zu", i);
@@
-352,9
+348,7
@@
static int ctail_init (void)
static int ctail_shutdown (void)
{
static int ctail_shutdown (void)
{
- size_t i;
-
- for (i = 0; i < tail_match_list_num; i++)
+ for (size_t i = 0; i < tail_match_list_num; i++)
{
tail_match_destroy (tail_match_list[i]);
tail_match_list[i] = NULL;
{
tail_match_destroy (tail_match_list[i]);
tail_match_list[i] = NULL;