addressed review comments

pull/6450/head
Hideki Miyazaki 2023-05-31 06:54:14 +09:00
parent 63a5fe3229
commit 554e6472b5
No known key found for this signature in database
GPG Key ID: 4EE161CA873C6418
2 changed files with 2 additions and 2 deletions

View File

@ -388,7 +388,7 @@ static int sockAddrEqual(
#ifndef WOLFSSL_IPV6
static int PeerIsIpv6(const SOCKADDR_S *peer, XSOCKLENT len)
{
if (len < (int)sizeof(peer->ss_family))
if (len < (XSOCKLENT)sizeof(peer->ss_family))
return 0;
return peer->ss_family == WOLFSSL_IP6;
}

View File

@ -65944,7 +65944,7 @@ static int test_dtls_msg_get_connected_port(int fd, word16 *port)
XMEMSET((byte*)&peer, 0, sizeof(peer));
len = sizeof(peer);
ret = getpeername(fd, (SOCKADDR*)&peer, &len);
if (ret != 0 || len > (int)sizeof(peer))
if (ret != 0 || len > (XSOCKLENT)sizeof(peer))
return -1;
switch (peer.ss_family) {
#ifdef WOLFSSL_IPV6