diff options
author | ume <ume@FreeBSD.org> | 2005-05-03 16:13:31 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2005-05-03 16:13:31 +0000 |
commit | b29f166ec1a926b9f182fb42c1f6ce4a48c1f2ff (patch) | |
tree | e58c6e7ce6d0038abd2069dd7e74f862e17f5676 | |
parent | 8c908fd79c9915aa18dfda8ed883f2debe905921 (diff) | |
download | FreeBSD-src-b29f166ec1a926b9f182fb42c1f6ce4a48c1f2ff.zip FreeBSD-src-b29f166ec1a926b9f182fb42c1f6ce4a48c1f2ff.tar.gz |
fix signed/unsigned comparison warnings.
Obtained from: NetBSD
-rw-r--r-- | lib/libc/net/getnameinfo.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libc/net/getnameinfo.c b/lib/libc/net/getnameinfo.c index 08c8a12..ab849a7 100644 --- a/lib/libc/net/getnameinfo.c +++ b/lib/libc/net/getnameinfo.c @@ -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; |