This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, master, updated. glibc-2.11-249-ga092b64


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  a092b645f84c2af4a302f00e242be595ed1a2117 (commit)
      from  66f1b8eeb20c49c8566abeeacf36540f258ad5f4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a092b645f84c2af4a302f00e242be595ed1a2117

commit a092b645f84c2af4a302f00e242be595ed1a2117
Author: Yann Droneaud <yann@droneaud.fr>
Date:   Fri Mar 5 16:52:31 2010 -0800

    Fix DEBUG statements in resolv/res_send.c

diff --git a/ChangeLog b/ChangeLog
index 57a64e9..9bdbb0a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-02-18  Yann Droneaud  <yann@droneaud.fr>
+
+	* resolv/res_send.c: Fixed DEBUG statements.
+	Moved tmpbuf declaration to block beginning and
+	updated pointer names used in multiple DprintQ() calls
+
 2010-02-18  H.J. Lu  <hongjiu.lu@intel.com>
 
 	* config.make.in (config-asflags-i686): Define.
diff --git a/resolv/res_send.c b/resolv/res_send.c
index 28a47e4..b0966ae 100644
--- a/resolv/res_send.c
+++ b/resolv/res_send.c
@@ -490,6 +490,9 @@ __libc_res_nsend(res_state statp, const u_char *buf, int buflen,
 	for (try = 0; try < statp->retry; try++) {
 	    for (ns = 0; ns < MAXNS; ns++)
 	    {
+#ifdef DEBUG
+		char tmpbuf[40];
+#endif
 		struct sockaddr_in6 *nsap = EXT(statp).nsaddrs[ns];
 
 		if (nsap == NULL)
@@ -530,9 +533,6 @@ __libc_res_nsend(res_state statp, const u_char *buf, int buflen,
 		}
 #endif
 
-#ifdef DEBUG
-		char tmpbuf[40];
-#endif
 		Dprint(statp->options & RES_DEBUG,
 		       (stdout, ";; Querying server (# %d) address = %s\n",
 			ns + 1, inet_ntop(AF_INET6, &nsap->sin6_addr,
@@ -575,11 +575,12 @@ __libc_res_nsend(res_state statp, const u_char *buf, int buflen,
 			(statp->pfcode & RES_PRF_REPLY),
 			(stdout, "%s", ""),
 			ans, (resplen > anssiz) ? anssiz : resplen);
-		if (buf2 != NULL)
+		if (buf2 != NULL) {
 		  DprintQ((statp->options & RES_DEBUG) ||
 			  (statp->pfcode & RES_PRF_REPLY),
 			  (stdout, "%s", ""),
 			  *ansp2, (*resplen2 > *nansp2) ? *nansp2 : *resplen2);
+		}
 
 		/*
 		 * If we have temporarily opened a virtual circuit,
@@ -883,7 +884,7 @@ send_vc(res_state statp,
 			(statp->pfcode & RES_PRF_REPLY),
 			(stdout, ";; old answer (unexpected):\n"),
 			*thisansp,
-			(rlen > *thisanssiz) ? *thisanssiz: rlen);
+			(rlen > *thisanssizp) ? *thisanssizp: rlen);
 		goto read_len;
 	}
 
@@ -1186,7 +1187,7 @@ send_dg(res_state statp,
 			 */
 			Dprint(statp->options & RES_DEBUG,
 			       (stdout, ";; undersized: %d\n",
-				*thisresplen));
+				*thisresplenp));
 			*terrno = EMSGSIZE;
 			goto err_out;
 		}
@@ -1201,8 +1202,8 @@ send_dg(res_state statp,
 				(statp->pfcode & RES_PRF_REPLY),
 				(stdout, ";; old answer:\n"),
 				thisansp,
-				(*thisresplen > *thisanssiz)
-				? *thisanssiz : *thisresplen);
+				(*thisresplenp > *thisanssizp)
+				? *thisanssizp : *thisresplenp);
 			goto wait;
 		}
 		if (!(statp->options & RES_INSECURE1) &&
@@ -1216,8 +1217,8 @@ send_dg(res_state statp,
 				(statp->pfcode & RES_PRF_REPLY),
 				(stdout, ";; not our server:\n"),
 				thisansp,
-				(*thisresplen > *thisanssiz)
-				? *thisanssiz : *thisresplen);
+				(*thisresplenp > *thisanssizp)
+				? *thisanssizp : *thisresplenp);
 			goto wait;
 		}
 #ifdef RES_USE_EDNS0
@@ -1232,9 +1233,9 @@ send_dg(res_state statp,
 			DprintQ(statp->options & RES_DEBUG,
 				(stdout,
 				 "server rejected query with EDNS0:\n"),
-				thisans,
-				(*thisresplen > *thisanssiz)
-				? *thisanssiz : *thisresplen);
+				thisansp,
+				(*thisresplenp > *thisanssizp)
+				? *thisanssizp : *thisresplenp);
 			/* record the error */
 			statp->_flags |= RES_F_EDNS0ERR;
 			goto err_out;
@@ -1258,8 +1259,8 @@ send_dg(res_state statp,
 				(statp->pfcode & RES_PRF_REPLY),
 				(stdout, ";; wrong query name:\n"),
 				thisansp,
-				(*thisresplen > *thisanssiz)
-				? *thisanssiz : *thisresplen);
+				(*thisresplenp > *thisanssizp)
+				? *thisanssizp : *thisresplenp);
 			goto wait;
 		}
 		if (anhp->rcode == SERVFAIL ||
@@ -1268,8 +1269,8 @@ send_dg(res_state statp,
 			DprintQ(statp->options & RES_DEBUG,
 				(stdout, "server rejected query:\n"),
 				thisansp,
-				(*thisresplen > *thisanssiz)
-				? *thisanssiz : *thisresplen);
+				(*thisresplenp > *thisanssizp)
+				? *thisanssizp : *thisresplenp);
 
 			if (recvresp1 || (buf2 != NULL && recvresp2))
 			  return resplen;
@@ -1295,8 +1296,8 @@ send_dg(res_state statp,
 			DprintQ(statp->options & RES_DEBUG,
 				(stdout, "referred query:\n"),
 				thisansp,
-				(*thisresplen > *thisanssiz)
-				? *thisanssiz : *thisresplen);
+				(*thisresplenp > *thisanssizp)
+				? *thisanssizp : *thisresplenp);
 			goto next_ns;
 		}
 		if (!(statp->options & RES_IGNTC) && anhp->tc) {

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog         |    6 ++++++
 resolv/res_send.c |   39 ++++++++++++++++++++-------------------
 2 files changed, 26 insertions(+), 19 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]