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 #1832 from rubenk/check-for-c99-compiler
[collectd.git]
/
src
/
write_tsdb.c
diff --git
a/src/write_tsdb.c
b/src/write_tsdb.c
index
7a8f851
..
78166b1
100644
(file)
--- a/
src/write_tsdb.c
+++ b/
src/write_tsdb.c
@@
-42,6
+42,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"
@@
-155,7
+156,6
@@
static int wt_flush_nolock(cdtime_t timeout, struct wt_callback *cb)
static int wt_callback_init(struct wt_callback *cb)
{
static int wt_callback_init(struct wt_callback *cb)
{
- struct addrinfo ai_hints = { 0 };
struct addrinfo *ai_list;
struct addrinfo *ai_ptr;
int status;
struct addrinfo *ai_list;
struct addrinfo *ai_ptr;
int status;
@@
-166,11
+166,11
@@
static int wt_callback_init(struct wt_callback *cb)
if (cb->sock_fd > 0)
return 0;
if (cb->sock_fd > 0)
return 0;
- ai_hints.ai_flags = AI_ADDRCONFIG;
- ai_hints.ai_family = AF_UNSPEC;
- ai_hints.ai_socktype = SOCK_STREAM;
-
-
ai_list = NULL
;
+ struct addrinfo ai_hints = {
+ .ai_family = AF_UNSPEC,
+ .ai_flags = AI_ADDRCONFIG,
+ .ai_socktype = SOCK_STREAM
+
}
;
status = getaddrinfo(node, service, &ai_hints, &ai_list);
if (status != 0)
status = getaddrinfo(node, service, &ai_hints, &ai_list);
if (status != 0)