Skip to content

Commit dcc3076

Browse files
authored
Fix NetworkManager compilation warning (espressif#9452)
1 parent 64235dc commit dcc3076

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

libraries/Network/src/NetworkManager.cpp

+5-4
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,11 @@ int NetworkManager::hostByName(const char* aHostname, IPAddress& aResult)
6767

6868
const char *servname = "0";
6969
struct addrinfo *res;
70-
const struct addrinfo hints = {
71-
.ai_family = AF_UNSPEC,
72-
.ai_socktype = SOCK_STREAM,
73-
};
70+
struct addrinfo hints;
71+
memset(&hints, 0, sizeof(hints));
72+
hints.ai_family = AF_UNSPEC;
73+
hints.ai_socktype = SOCK_STREAM;
74+
7475
err = lwip_getaddrinfo(aHostname, servname, &hints, &res);
7576
if (err == ERR_OK)
7677
{

0 commit comments

Comments
 (0)