diff options
author | Ulrich Drepper <drepper@redhat.com> | 2008-07-09 20:48:04 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2008-07-09 20:48:04 +0000 |
commit | fdc769f68bb9b17959f892e85db2987e3b4a1912 (patch) | |
tree | b5d48f6bf0eda611668315eca55ab0b1570c400e | |
parent | 44abc397e6203bbb46e73acee48e7ffd17e1f90a (diff) | |
download | glibc-fdc769f68bb9b17959f892e85db2987e3b4a1912.tar glibc-fdc769f68bb9b17959f892e85db2987e3b4a1912.tar.gz glibc-fdc769f68bb9b17959f892e85db2987e3b4a1912.tar.bz2 glibc-fdc769f68bb9b17959f892e85db2987e3b4a1912.zip |
* resolv/res_query.c (__libc_res_nquery): Issue debug message only
if DEBUG is defined.
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | resolv/res_query.c | 6 |
2 files changed, 7 insertions, 2 deletions
@@ -1,5 +1,8 @@ 2008-07-09 Ulrich Drepper <drepper@redhat.com> + * resolv/res_query.c (__libc_res_nquery): Issue debug message only + if DEBUG is defined. + * resolv/res_query.c (__libc_res_nquery): Align buffer for T_AAAA query. Adjust buffer size computation for padding. diff --git a/resolv/res_query.c b/resolv/res_query.c index d3a959f3b4..b2b45acde7 100644 --- a/resolv/res_query.c +++ b/resolv/res_query.c @@ -155,14 +155,14 @@ __libc_res_nquery(res_state statp, nquery1 = n; /* Align the buffer. */ int npad = ((nquery1 + __alignof__ (HEADER) - 1) - & ~(__alignof__ (HEADER))); + & ~(__alignof__ (HEADER) - 1)) - nquery1; if (n > bufsize - npad) { n = -1; goto unspec_nomem; } - query2 = buf + npad; int nused = n + npad; + query2 = buf + nused; n = res_nmkquery(statp, QUERY, name, class, T_AAAA, NULL, 0, NULL, query2, bufsize - nused); if (n > 0 @@ -204,8 +204,10 @@ __libc_res_nquery(res_state statp, if ((statp->options & RES_USE_EDNS0) != 0 && ((oflags ^ statp->_flags) & RES_F_EDNS0ERR) != 0) { statp->_flags |= RES_F_EDNS0ERR; +#ifdef DEBUG if (statp->options & RES_DEBUG) printf(";; res_nquery: retry without EDNS0\n"); +#endif goto again; } #ifdef DEBUG |