Fix NetworkManager compilation warning (#9452)

This commit is contained in:
Lucas Saavedra Vaz 2024-04-03 18:04:43 -03:00 committed by GitHub
parent 64235dc6d6
commit dcc307665f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -67,10 +67,11 @@ int NetworkManager::hostByName(const char* aHostname, IPAddress& aResult)
const char *servname = "0";
struct addrinfo *res;
const struct addrinfo hints = {
.ai_family = AF_UNSPEC,
.ai_socktype = SOCK_STREAM,
};
struct addrinfo hints;
memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
err = lwip_getaddrinfo(aHostname, servname, &hints, &res);
if (err == ERR_OK)
{