fix signed/unsigned comparison warnings.

Obtained from:	NetBSD
This commit is contained in:
Hajimu UMEMOTO 2005-05-03 16:13:31 +00:00
parent 2f22da5d97
commit 1ccfa322aa
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=145831

View file

@ -60,8 +60,8 @@ __FBSDID("$FreeBSD$");
static const struct afd {
int a_af;
int a_addrlen;
int a_socklen;
size_t a_addrlen;
socklen_t a_socklen;
int a_off;
} afdl [] = {
#ifdef INET6
@ -195,7 +195,7 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
* hostlen == 0 means that the caller does not want the result.
*/
} else if (flags & NI_NUMERICHOST) {
int numaddrlen;
size_t numaddrlen;
/* NUMERICHOST and NAMEREQD conflicts with each other */
if (flags & NI_NAMEREQD)
@ -281,7 +281,7 @@ ip6_parsenumeric(sa, addr, host, hostlen, flags)
size_t hostlen;
int flags;
{
int numaddrlen;
size_t numaddrlen;
char numaddr[512];
if (inet_ntop(AF_INET6, addr, numaddr, sizeof(numaddr)) == NULL)
@ -350,7 +350,7 @@ ip6_sa2str(sa6, buf, bufsiz, flags)
/* last resort */
n = snprintf(buf, bufsiz, "%u", sa6->sin6_scope_id);
if (n < 0 || n >= bufsiz)
if (n < 0 || (size_t)n >= bufsiz)
return -1;
else
return n;