1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-10 05:03:06 +03:00

* resolv/res_query.c (__libc_res_nquery): Add a few casts.

This commit is contained in:
Ulrich Drepper
2008-10-24 07:05:38 +00:00
parent 8d9d5d35de
commit 49685151ea
2 changed files with 8 additions and 4 deletions

View File

@@ -1,3 +1,7 @@
2008-10-24 Ulrich Drepper <drepper@redhat.com>
* resolv/res_query.c (__libc_res_nquery): Add a few casts.
2008-10-23 Ulrich Drepper <drepper@redhat.com> 2008-10-23 Ulrich Drepper <drepper@redhat.com>
* po/id.po: New file. * po/id.po: New file.

View File

@@ -244,15 +244,15 @@ __libc_res_nquery(res_state statp,
tests of HP2. */ tests of HP2. */
HEADER *hp2 = answerp2 ? (HEADER *) *answerp2 : hp; HEADER *hp2 = answerp2 ? (HEADER *) *answerp2 : hp;
if (n < sizeof (HEADER) && nanswerp2 != NULL if (n < (int) sizeof (HEADER) && nanswerp2 != NULL
&& *nanswerp2 > sizeof (HEADER)) && *nanswerp2 > (int) sizeof (HEADER))
{ {
/* Special case of partial answer. */ /* Special case of partial answer. */
assert (hp != hp2); assert (hp != hp2);
hp = hp2; hp = hp2;
} }
else if (nanswerp2 != NULL else if (nanswerp2 != NULL && *nanswerp2 < (int) sizeof (HEADER)
&& *nanswerp2 < sizeof (HEADER) && n > sizeof (HEADER)) && n > (int) sizeof (HEADER))
{ {
/* Special case of partial answer. */ /* Special case of partial answer. */
assert (hp != hp2); assert (hp != hp2);