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
/
apache.c
diff --git
a/src/apache.c
b/src/apache.c
index
afdeda4
..
650d678
100644
(file)
--- a/
src/apache.c
+++ b/
src/apache.c
@@
-25,6
+25,7
@@
**/
#include "collectd.h"
**/
#include "collectd.h"
+
#include "common.h"
#include "plugin.h"
#include "configfile.h"
#include "common.h"
#include "plugin.h"
#include "configfile.h"
@@
-174,7
+175,6
@@
static size_t apache_header_callback (void *buf, size_t size, size_t nmemb,
static int config_add (oconfig_item_t *ci)
{
apache_t *st;
static int config_add (oconfig_item_t *ci)
{
apache_t *st;
- int i;
int status;
st = calloc (1, sizeof (*st));
int status;
st = calloc (1, sizeof (*st));
@@
-194,7
+194,7
@@
static int config_add (oconfig_item_t *ci)
}
assert (st->name != NULL);
}
assert (st->name != NULL);
- 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;
@@
-271,9
+271,8
@@
static int config_add (oconfig_item_t *ci)
static int config (oconfig_item_t *ci)
{
int status = 0;
static int config (oconfig_item_t *ci)
{
int status = 0;
- int i;
- 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;
@@
-464,8
+463,7
@@
static void submit_scoreboard (char *buf, apache_t *st)
long long response_start = 0LL;
long long response_end = 0LL;
long long response_start = 0LL;
long long response_end = 0LL;
- int i;
- for (i = 0; buf[i] != '\0'; i++)
+ for (int i = 0; buf[i] != '\0'; i++)
{
if (buf[i] == '.') open++;
else if (buf[i] == '_') waiting++;
{
if (buf[i] == '.') open++;
else if (buf[i] == '_') waiting++;