X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=udp.c;h=0d945acdb4df07d6f4645262154c042a502af358;hb=03d4c598998e9373fd538ce1fb920c62dbde1cdd;hp=1535f290c587a9efaa261d1ad2da740283ad024e;hpb=1fc8a4acb3ef658696038c9c4bd3c155fbc27ac3;p=secnet.git 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: