X-Git-Url: https://git.distorted.org.uk/~mdw/secnet/blobdiff_plain/9c6a8729f6553615786878b382d4d44d2a54eec0..refs/heads/mdw/xdh:/udp.c diff --git a/udp.c b/udp.c index 9be56e1..0d945ac 100644 --- a/udp.c +++ b/udp.c @@ -269,7 +269,8 @@ static bool_t record_socket_gotaddr(struct udpcommon *uc, struct udpsock *us, socklen_t salen=sizeof(us->addr); int r=getsockname(us->fd,&us->addr.sa,&salen); if (r) FAIL("getsockname()"); - if (salen>sizeof(us->addr)) { errno=0; FAIL("getsockname() length"); } + if ((size_t)salen>sizeof(us->addr)) /* cast squashes clang warning */ + { errno=0; FAIL("getsockname() length"); } return True; failed: