mirror of
https://github.com/ep00ch/lwip-contrib-mac.git
synced 2024-10-12 08:23:42 +00:00
Add casts where appropriate to fix conversion warnings
This commit is contained in:
parent
b243b97543
commit
ccb8913d65
@ -130,12 +130,13 @@ ping_send(int s, struct ip_addr *addr)
|
|||||||
struct icmp_echo_hdr *iecho;
|
struct icmp_echo_hdr *iecho;
|
||||||
struct sockaddr_in to;
|
struct sockaddr_in to;
|
||||||
size_t ping_size = sizeof(struct icmp_echo_hdr) + PING_DATA_SIZE;
|
size_t ping_size = sizeof(struct icmp_echo_hdr) + PING_DATA_SIZE;
|
||||||
|
LWIP_ASSERT("ping_size is too big", ping_size <= 0xffff);
|
||||||
|
|
||||||
if (!(iecho = mem_malloc(ping_size))) {
|
if (!(iecho = mem_malloc((mem_size_t)ping_size))) {
|
||||||
return ERR_MEM;
|
return ERR_MEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
ping_prepare_echo(iecho, ping_size);
|
ping_prepare_echo(iecho, (u16_t)ping_size);
|
||||||
|
|
||||||
to.sin_len = sizeof(to);
|
to.sin_len = sizeof(to);
|
||||||
to.sin_family = AF_INET;
|
to.sin_family = AF_INET;
|
||||||
|
Loading…
Reference in New Issue
Block a user