X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fstatsd.c;h=285486d88cee53777c5289db1cd0e3cec632d1f8;hb=aa3811995bfae69f0d1a0f897acfa4a9a4c0138a;hp=5df072d3f3e2bd939b5bec3577660a363c3dbda8;hpb=fe62d5e7df4374616d17246889d61a57ef46a1c4;p=collectd.git diff --git a/src/statsd.c b/src/statsd.c index 5df072d3..285486d8 100644 --- a/src/statsd.c +++ b/src/statsd.c @@ -500,7 +500,6 @@ static int statsd_network_init (struct pollfd **ret_fds, /* {{{ */ struct pollfd *fds = NULL; size_t fds_num = 0; - struct addrinfo ai_hints = { 0 }; struct addrinfo *ai_list = NULL; struct addrinfo *ai_ptr; int status; @@ -509,9 +508,11 @@ static int statsd_network_init (struct pollfd **ret_fds, /* {{{ */ char const *service = (conf_service != NULL) ? conf_service : STATSD_DEFAULT_SERVICE; - ai_hints.ai_flags = AI_PASSIVE | AI_ADDRCONFIG; - ai_hints.ai_family = AF_UNSPEC; - ai_hints.ai_socktype = SOCK_DGRAM; + struct addrinfo ai_hints = { + .ai_family = AF_UNSPEC, + .ai_flags = AI_PASSIVE | AI_ADDRCONFIG, + .ai_socktype = SOCK_DGRAM + }; status = getaddrinfo (node, service, &ai_hints, &ai_list); if (status != 0)