aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2008-10-24 08:20:04 +0000
committerUlrich Drepper <drepper@redhat.com>2008-10-24 08:20:04 +0000
commit660675dec1300ccac9ea7038c17f61711e9b94ce (patch)
tree3310d43dc0172eaa28821a8b877337f40761e87c
parent49685151ea8ad2c0750a996984c719833264295a (diff)
downloadglibc-660675dec1300ccac9ea7038c17f61711e9b94ce.tar
glibc-660675dec1300ccac9ea7038c17f61711e9b94ce.tar.gz
glibc-660675dec1300ccac9ea7038c17f61711e9b94ce.tar.bz2
glibc-660675dec1300ccac9ea7038c17f61711e9b94ce.zip
Fix tests for existence of second reply.
-rw-r--r--ChangeLog1
-rw-r--r--resolv/res_query.c6
2 files changed, 4 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index ad37c3b17f..92b19ff6c6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
2008-10-24 Ulrich Drepper <drepper@redhat.com>
* resolv/res_query.c (__libc_res_nquery): Add a few casts.
+ Fix tests for existence of second reply.
2008-10-23 Ulrich Drepper <drepper@redhat.com>
diff --git a/resolv/res_query.c b/resolv/res_query.c
index b6c70f0462..6ac33ce64c 100644
--- a/resolv/res_query.c
+++ b/resolv/res_query.c
@@ -244,14 +244,14 @@ __libc_res_nquery(res_state statp,
tests of HP2. */
HEADER *hp2 = answerp2 ? (HEADER *) *answerp2 : hp;
- if (n < (int) sizeof (HEADER) && nanswerp2 != NULL
- && *nanswerp2 > (int) sizeof (HEADER))
+ if (n < (int) sizeof (HEADER) && answerp2 != NULL
+ && *resplen2 > (int) sizeof (HEADER))
{
/* Special case of partial answer. */
assert (hp != hp2);
hp = hp2;
}
- else if (nanswerp2 != NULL && *nanswerp2 < (int) sizeof (HEADER)
+ else if (answerp2 != NULL && *resplen2 < (int) sizeof (HEADER)
&& n > (int) sizeof (HEADER))
{
/* Special case of partial answer. */