--- tme/host/bsd/bsd-if.c 2018/04/24 16:37:52 1.1.1.1 +++ tme/host/bsd/bsd-if.c 2018/04/24 16:39:12 1.1.1.2 @@ -1,4 +1,4 @@ -/* $Id: bsd-if.c,v 1.1.1.1 2018/04/24 16:37:52 root Exp $ */ +/* $Id: bsd-if.c,v 1.1.1.2 2018/04/24 16:39:12 root Exp $ */ /* host/bsd/bsd-if.c - BSD interface support: */ @@ -34,7 +34,7 @@ */ #include -_TME_RCSID("$Id: bsd-if.c,v 1.1.1.1 2018/04/24 16:37:52 root Exp $"); +_TME_RCSID("$Id: bsd-if.c,v 1.1.1.2 2018/04/24 16:39:12 root Exp $"); /* includes: */ #include "bsd-impl.h" @@ -98,7 +98,7 @@ tme_bsd_if_find(const char *ifr_name_use /* make a dummy socket so we can read the interface list: */ if ((dummy_fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { - return (NULL); + return (-1); } /* read the interface list: */ @@ -128,10 +128,10 @@ tme_bsd_if_find(const char *ifr_name_use if (((ifr_offset + sizeof(ifr->ifr_name) + sizeof(struct sockaddr)) - > ifc.ifc_len) + > (size_t) ifc.ifc_len) || ((ifr_offset + SIZEOF_IFREQ(ifr)) - > ifc.ifc_len)) { + > (size_t) ifc.ifc_len)) { errno = ENOENT; break; }