Update WiFiClient.cpp (#4573)
Replace (depricated) bzero, bcopy with memset and memcpy.
This commit is contained in:
parent
82e71f9b50
commit
3236358ded
@ -216,9 +216,9 @@ int WiFiClient::connect(IPAddress ip, uint16_t port, int32_t timeout)
|
|||||||
|
|
||||||
uint32_t ip_addr = ip;
|
uint32_t ip_addr = ip;
|
||||||
struct sockaddr_in serveraddr;
|
struct sockaddr_in serveraddr;
|
||||||
bzero((char *) &serveraddr, sizeof(serveraddr));
|
memset((char *) &serveraddr, 0, sizeof(serveraddr));
|
||||||
serveraddr.sin_family = AF_INET;
|
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);
|
serveraddr.sin_port = htons(port);
|
||||||
fd_set fdset;
|
fd_set fdset;
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
|
Loading…
Reference in New Issue
Block a user