X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fstatsd.c;h=1eb8cb94c59df032f1615909a1341ec63cab432c;hb=3fae5596643f1e361eb18c3d65448f8bc02fdd80;hp=a0c6e4f3e935117fd9f4c428a64072e7f007bdff;hpb=b599cc64d3ba270fb9fb7116631a01b7404f1a9b;p=collectd.git diff --git a/src/statsd.c b/src/statsd.c index a0c6e4f3..1eb8cb94 100644 --- a/src/statsd.c +++ b/src/statsd.c @@ -500,7 +500,7 @@ static int statsd_network_init (struct pollfd **ret_fds, /* {{{ */ struct pollfd *fds = NULL; size_t fds_num = 0; - struct addrinfo ai_hints; + struct addrinfo ai_hints = { 0 }; struct addrinfo *ai_list = NULL; struct addrinfo *ai_ptr; int status; @@ -509,7 +509,6 @@ static int statsd_network_init (struct pollfd **ret_fds, /* {{{ */ char const *service = (conf_service != NULL) ? conf_service : STATSD_DEFAULT_SERVICE; - memset (&ai_hints, 0, sizeof (ai_hints)); ai_hints.ai_flags = AI_PASSIVE; #ifdef AI_ADDRCONFIG ai_hints.ai_flags |= AI_ADDRCONFIG;