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 3236358

Browse filesBrowse files
authored
Update WiFiClient.cpp (espressif#4573)
Replace (depricated) bzero, bcopy with memset and memcpy.
1 parent 82e71f9 commit 3236358
Copy full SHA for 3236358

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎libraries/WiFi/src/WiFiClient.cpp

Copy file name to clipboardExpand all lines: libraries/WiFi/src/WiFiClient.cpp
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,9 @@ int WiFiClient::connect(IPAddress ip, uint16_t port, int32_t timeout)
216216

217217
uint32_t ip_addr = ip;
218218
struct sockaddr_in serveraddr;
219-
bzero((char *) &serveraddr, sizeof(serveraddr));
219+
memset((char *) &serveraddr, 0, sizeof(serveraddr));
220220
serveraddr.sin_family = AF_INET;
221-
bcopy((const void *)(&ip_addr), (void *)&serveraddr.sin_addr.s_addr, 4);
221+
memcpy((void *)&serveraddr.sin_addr.s_addr, (const void *)(&ip_addr), 4);
222222
serveraddr.sin_port = htons(port);
223223
fd_set fdset;
224224
struct timeval tv;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.