Merge branch 'rs/inline-compat-path-macros'
[gitweb.git] / compat / mingw.c
index df0fa03194aa696b91132094dd32abb54fdf7cd4..c5c37e53ce0fc534b1739a75c4abde0c67027d14 100644 (file)
@@ -1310,8 +1310,7 @@ static int WSAAPI getaddrinfo_stub(const char *node, const char *service,
        else
                ai->ai_canonname = NULL;
 
-       sin = xmalloc(ai->ai_addrlen);
-       memset(sin, 0, ai->ai_addrlen);
+       sin = xcalloc(1, ai->ai_addrlen);
        sin->sin_family = AF_INET;
        /* Note: getaddrinfo is supposed to allow service to be a string,
         * which should be looked up using getservbyname. This is