X-Git-Url: https://git.distorted.org.uk/~mdw/secnet/blobdiff_plain/1fc8a4acb3ef658696038c9c4bd3c155fbc27ac3..refs/heads/mdw/xdh:/udp.c diff --git a/udp.c b/udp.c index 1535f29..0d945ac 100644 --- a/udp.c +++ b/udp.c @@ -6,7 +6,7 @@ * * secnet is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version d of the License, or + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * secnet is distributed in the hope that it will be useful, but @@ -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: