summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorRay Lai <ray@cvs.openbsd.org>2007-05-12 21:38:15 +0000
committerRay Lai <ray@cvs.openbsd.org>2007-05-12 21:38:15 +0000
commit7e69cf3ee2bcbf56e769df7b6f03bcf13df03e23 (patch)
tree8f8dab4e4958ae3990240070db1b42ea261f3f23 /lib/libc
parentce4eea266def4c3fbdbda2eee8f79d24d82c5416 (diff)
Use size_t for strlen results.
OK moritz@.
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/net/getaddrinfo.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/libc/net/getaddrinfo.c b/lib/libc/net/getaddrinfo.c
index 532b2ee2c81..3f8521cb314 100644
--- a/lib/libc/net/getaddrinfo.c
+++ b/lib/libc/net/getaddrinfo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getaddrinfo.c,v 1.63 2007/05/12 16:18:06 ray Exp $ */
+/* $OpenBSD: getaddrinfo.c,v 1.64 2007/05/12 21:38:14 ray Exp $ */
/* $KAME: getaddrinfo.c,v 1.31 2000/08/31 17:36:43 itojun Exp $ */
/*
@@ -1004,17 +1004,19 @@ getanswer(const querybuf *answer, int anslen, const char *qname, int qtype,
}
cp += n + QFIXEDSZ;
if (qtype == T_A || qtype == T_AAAA || qtype == T_ANY) {
+ size_t len;
+
/* res_send() has already verified that the query name is the
* same as the one we sent; this just gets the expanded name
* (i.e., with the succeeding search-domain tacked on).
*/
- n = strlen(bp) + 1; /* for the \0 */
- if (n >= MAXHOSTNAMELEN) {
+ len = strlen(bp) + 1; /* for the \0 */
+ if (len >= MAXHOSTNAMELEN) {
h_errno = NO_RECOVERY;
return (NULL);
}
canonname = bp;
- bp += n;
+ bp += len;
/* The qname can be abbreviated, but h_name is now absolute. */
qname = canonname;
}