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 #1829 from rubenk/clang-format
[collectd.git]
/
src
/
teamspeak2.c
diff --git
a/src/teamspeak2.c
b/src/teamspeak2.c
index
41f58e5
..
cf093c5
100644
(file)
--- a/
src/teamspeak2.c
+++ b/
src/teamspeak2.c
@@
-198,7
+198,7
@@
static int tss2_get_socket (FILE **ret_read_fh, FILE **ret_write_fh)
* Returns connected file objects or establishes the connection
* if it's not already present
*/
* Returns connected file objects or establishes the connection
* if it's not already present
*/
- struct addrinfo ai_hints;
+ struct addrinfo ai_hints
= { 0 }
;
struct addrinfo *ai_head;
struct addrinfo *ai_ptr;
int sd = -1;
struct addrinfo *ai_head;
struct addrinfo *ai_ptr;
int sd = -1;
@@
-216,7
+216,6
@@
static int tss2_get_socket (FILE **ret_read_fh, FILE **ret_write_fh)
}
/* Get all addrs for this hostname */
}
/* Get all addrs for this hostname */
- memset (&ai_hints, 0, sizeof (ai_hints));
#ifdef AI_ADDRCONFIG
ai_hints.ai_flags |= AI_ADDRCONFIG;
#endif
#ifdef AI_ADDRCONFIG
ai_hints.ai_flags |= AI_ADDRCONFIG;
#endif
@@
-511,7
+510,7
@@
static int tss2_read_vserver (vserver_list_t *vserver)
gauge_t packet_loss = NAN;
int valid = 0;
gauge_t packet_loss = NAN;
int valid = 0;
- char plugin_instance[DATA_MAX_NAME_LEN];
+ char plugin_instance[DATA_MAX_NAME_LEN]
= { 0 }
;
FILE *read_fh;
FILE *write_fh;
FILE *read_fh;
FILE *write_fh;
@@
-527,8
+526,6
@@
static int tss2_read_vserver (vserver_list_t *vserver)
if (vserver == NULL)
{
/* Request global information */
if (vserver == NULL)
{
/* Request global information */
- memset (plugin_instance, 0, sizeof (plugin_instance));
-
status = tss2_send_request (write_fh, "gi\r\n");
}
else
status = tss2_send_request (write_fh, "gi\r\n");
}
else
@@
-723,7
+720,7
@@
static int tss2_config (const char *key, const char *value)
/*
* Interpret configuration values
*/
/*
* Interpret configuration values
*/
- if (strcasecmp ("Host", key) == 0)
+
if (strcasecmp ("Host", key) == 0)
{
char *temp;
{
char *temp;
@@
-806,7
+803,7
@@
static int tss2_read (void)
if (success == 0)
return (-1);
if (success == 0)
return (-1);
- return (0);
+
return (0);
} /* int tss2_read */
static int tss2_shutdown(void)
} /* int tss2_read */
static int tss2_shutdown(void)