treewide: replace memset to 0 with initializers
[collectd.git] / src / daemon / common.c
index f9b1433..9da4775 100644 (file)
@@ -1518,7 +1518,7 @@ int service_name_to_port_number (const char *service_name)
 {
        struct addrinfo *ai_list;
        struct addrinfo *ai_ptr;
-       struct addrinfo ai_hints;
+       struct addrinfo ai_hints = { 0 };
        int status;
        int service_number;
 
@@ -1526,7 +1526,6 @@ int service_name_to_port_number (const char *service_name)
                return (-1);
 
        ai_list = NULL;
-       memset (&ai_hints, 0, sizeof (ai_hints));
        ai_hints.ai_family = AF_UNSPEC;
 
        status = getaddrinfo (/* node = */ NULL, service_name,