struct pollfd *fds = NULL;
size_t fds_num = 0;
- struct addrinfo ai_hints = { 0 };
- struct addrinfo *ai_list = NULL;
+ struct addrinfo *ai_list;
struct addrinfo *ai_ptr;
int status;
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)