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
/
teamspeak2.c
diff --git
a/src/teamspeak2.c
b/src/teamspeak2.c
index
5d53460
..
a1cde32
100644
(file)
--- a/
src/teamspeak2.c
+++ b/
src/teamspeak2.c
@@
-22,6
+22,7
@@
**/
#include "collectd.h"
**/
#include "collectd.h"
+
#include "common.h"
#include "plugin.h"
#include "common.h"
#include "plugin.h"
@@
-199,7
+200,6
@@
static int tss2_get_socket (FILE **ret_read_fh, FILE **ret_write_fh)
* if it's not already present
*/
struct addrinfo *ai_head;
* if it's not already present
*/
struct addrinfo *ai_head;
- struct addrinfo *ai_ptr;
int sd = -1;
int status;
int sd = -1;
int status;
@@
-233,7
+233,7
@@
static int tss2_get_socket (FILE **ret_read_fh, FILE **ret_write_fh)
}
/* Try all given hosts until we can connect to one */
}
/* Try all given hosts until we can connect to one */
- for (ai_ptr = ai_head; ai_ptr != NULL; ai_ptr = ai_ptr->ai_next)
+ for (
struct addrinfo *
ai_ptr = ai_head; ai_ptr != NULL; ai_ptr = ai_ptr->ai_next)
{
/* Create socket */
sd = socket (ai_ptr->ai_family, ai_ptr->ai_socktype,
{
/* Create socket */
sd = socket (ai_ptr->ai_family, ai_ptr->ai_socktype,
@@
-769,7
+769,6
@@
static int tss2_read (void)
* Poll function which collects global and vserver information
* and submits it to collectd
*/
* Poll function which collects global and vserver information
* and submits it to collectd
*/
- vserver_list_t *vserver;
int success = 0;
int status;
int success = 0;
int status;
@@
-785,7
+784,7
@@
static int tss2_read (void)
}
/* Handle vservers */
}
/* Handle vservers */
- for (vserver = server_list; vserver != NULL; vserver = vserver->next)
+ for (vserver
_list_t *vserver
= server_list; vserver != NULL; vserver = vserver->next)
{
status = tss2_read_vserver (vserver);
if (status == 0)
{
status = tss2_read_vserver (vserver);
if (status == 0)