diff options
| author | tyx <[email protected]> | 2022-04-17 22:06:13 +0800 |
|---|---|---|
| committer | guo <[email protected]> | 2022-04-20 10:41:13 +0800 |
| commit | 5fa15a19a0917e762c8d10207544f2a0396fd15b (patch) | |
| tree | fb9e8ee0066ac63e93ddb53e092ba25f29378efe /components | |
| parent | a6135ebcf3d046de7f309aa757a88b94b924f3cf (diff) | |
[lwip] Fix compilation warning
Diffstat (limited to 'components')
| -rw-r--r-- | components/net/lwip/lwip-2.0.3/src/apps/ping/ping.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/net/lwip/lwip-2.0.3/src/apps/ping/ping.c b/components/net/lwip/lwip-2.0.3/src/apps/ping/ping.c index 6251504f59..989fb0507a 100644 --- a/components/net/lwip/lwip-2.0.3/src/apps/ping/ping.c +++ b/components/net/lwip/lwip-2.0.3/src/apps/ping/ping.c @@ -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) { |
