[lwip] Fix compilation warning
@@ -157,15 +157,15 @@ rt_err_t ping(char* target_name, rt_uint32_t times, rt_size_t size)
size = PING_DATA_SIZE;
}
- memset(&hint, 0, sizeof(hint));
+ rt_memset(&hint, 0, sizeof(hint));
/* convert URL to IP */
if (lwip_getaddrinfo(target_name, NULL, &hint, &res) != 0)
{
rt_kprintf("ping: unknown host %s\n", target_name);
return -RT_ERROR;
}
- memcpy(&h, &res->ai_addr, sizeof(struct sockaddr_in *));
- memcpy(&ina, &h->sin_addr, sizeof(ina));
+ rt_memcpy(&h, &res->ai_addr, sizeof(struct sockaddr_in *));
+ rt_memcpy(&ina, &h->sin_addr, sizeof(ina));
lwip_freeaddrinfo(res);
if (inet_aton(inet_ntoa(ina), &target_addr) == 0)
{
