Browse Source

Merge pull request #6450 from miyazakh/fix_jenkins_android

fix to cast diff type, int and uint
Chris Conlon 10 months ago
parent
commit
806c75d28b
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/wolfio.c
  2. 1 1
      tests/api.c

+ 1 - 1
src/wolfio.c

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

+ 1 - 1
tests/api.c

@@ -66317,7 +66317,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 > sizeof(peer))
+    if (ret != 0 || len > (XSOCKLENT)sizeof(peer))
         return -1;
     switch (peer.ss_family) {
 #ifdef WOLFSSL_IPV6