Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dcc3076

Browse filesBrowse files
authored
Fix NetworkManager compilation warning (#9452)
1 parent 64235dc commit dcc3076
Copy full SHA for dcc3076

File tree

Expand file treeCollapse file tree

1 file changed

+5
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-4
lines changed

‎libraries/Network/src/NetworkManager.cpp

Copy file name to clipboardExpand all lines: libraries/Network/src/NetworkManager.cpp
+5-4Lines changed: 5 additions & 4 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.