From 3236358dedd91c44c7ff32f7c23f384c59c8368b Mon Sep 17 00:00:00 2001 From: Clemens Kirchgatterer Date: Tue, 1 Dec 2020 15:35:12 +0100 Subject: [PATCH] Update WiFiClient.cpp (#4573) Replace (depricated) bzero, bcopy with memset and memcpy. --- libraries/WiFi/src/WiFiClient.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/WiFi/src/WiFiClient.cpp b/libraries/WiFi/src/WiFiClient.cpp index 52df273149a..f097ff3c984 100644 --- a/libraries/WiFi/src/WiFiClient.cpp +++ b/libraries/WiFi/src/WiFiClient.cpp @@ -216,9 +216,9 @@ int WiFiClient::connect(IPAddress ip, uint16_t port, int32_t timeout) uint32_t ip_addr = ip; struct sockaddr_in serveraddr; - bzero((char *) &serveraddr, sizeof(serveraddr)); + memset((char *) &serveraddr, 0, sizeof(serveraddr)); serveraddr.sin_family = AF_INET; - bcopy((const void *)(&ip_addr), (void *)&serveraddr.sin_addr.s_addr, 4); + memcpy((void *)&serveraddr.sin_addr.s_addr, (const void *)(&ip_addr), 4); serveraddr.sin_port = htons(port); fd_set fdset; struct timeval tv;