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 #1842 from rubenk/declare-loop-variable-in-for-loop-controlling...
[collectd.git]
/
src
/
openvpn.c
diff --git
a/src/openvpn.c
b/src/openvpn.c
index
8bbb82b
..
00ae736
100644
(file)
--- a/
src/openvpn.c
+++ b/
src/openvpn.c
@@
-522,12
+522,12
@@
static int multi4_read (const char *name, FILE *fh)
static int openvpn_read (void)
{
FILE *fh;
static int openvpn_read (void)
{
FILE *fh;
- int
i,
read;
+ int read;
read = 0;
/* call the right read function for every status entry in the list */
read = 0;
/* call the right read function for every status entry in the list */
- for (i = 0; i < vpn_num; i++)
+ for (i
nt i
= 0; i < vpn_num; i++)
{
int vpn_read = 0;
{
int vpn_read = 0;
@@
-651,7
+651,7
@@
static int openvpn_config (const char *key, const char *value)
if (strcasecmp ("StatusFile", key) == 0)
{
char *status_file, *status_name, *filename;
if (strcasecmp ("StatusFile", key) == 0)
{
char *status_file, *status_name, *filename;
- int status_version
, i
;
+ int status_version;
vpn_status_t *temp;
/* try to detect the status file format */
vpn_status_t *temp;
/* try to detect the status file format */
@@
-687,7
+687,7
@@
static int openvpn_config (const char *key, const char *value)
}
/* scan the list looking for a clone */
}
/* scan the list looking for a clone */
- for (i = 0; i < vpn_num; i++)
+ for (i
nt i
= 0; i < vpn_num; i++)
{
if (strcasecmp (vpn_list[i]->name, status_name) == 0)
{
{
if (strcasecmp (vpn_list[i]->name, status_name) == 0)
{
@@
-778,9
+778,7
@@
static int openvpn_config (const char *key, const char *value)
/* shutdown callback */
static int openvpn_shutdown (void)
{
/* shutdown callback */
static int openvpn_shutdown (void)
{
- int i;
-
- for (i = 0; i < vpn_num; i++)
+ for (int i = 0; i < vpn_num; i++)
{
sfree (vpn_list[i]->file);
sfree (vpn_list[i]);
{
sfree (vpn_list[i]->file);
sfree (vpn_list[i]);