mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
resolv: Remove debugging code from compat-gethnamaddr.c
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
2019-02-18 Florian Weimer <fweimer@redhat.com>
|
||||||
|
|
||||||
|
* resolv/compat-gethnamaddr.c (Dprintf): Remove definition.
|
||||||
|
(getanswer): Do not call Dprintf.
|
||||||
|
(res_gethostbyname2_context): Likewise.
|
||||||
|
(res_gethostbyaddr_context): Likewise.
|
||||||
|
|
||||||
2019-02-18 Florian Weimer <fweimer@redhat.com>
|
2019-02-18 Florian Weimer <fweimer@redhat.com>
|
||||||
|
|
||||||
* libio/libio.h (_IO_stdin, _IO_stdout, _IO_stderr): Remove
|
* libio/libio.h (_IO_stdin, _IO_stdout, _IO_stderr): Remove
|
||||||
|
@@ -119,21 +119,6 @@ typedef union {
|
|||||||
extern int h_errno;
|
extern int h_errno;
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# ifdef DEBUG
|
|
||||||
static void
|
|
||||||
Dprintf (char *msg, int num)
|
|
||||||
{
|
|
||||||
if (_res.options & RES_DEBUG) {
|
|
||||||
int save = errno;
|
|
||||||
|
|
||||||
printf(msg, num);
|
|
||||||
__set_errno (save);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
# else
|
|
||||||
# define Dprintf(msg, num) /*nada*/
|
|
||||||
# endif
|
|
||||||
|
|
||||||
# define BOUNDED_INCR(x) \
|
# define BOUNDED_INCR(x) \
|
||||||
do { \
|
do { \
|
||||||
cp += x; \
|
cp += x; \
|
||||||
@@ -162,7 +147,6 @@ getanswer (const querybuf *answer, int anslen, const char *qname, int qtype)
|
|||||||
char *bp, **ap, **hap;
|
char *bp, **ap, **hap;
|
||||||
int type, class, buflen, ancount, qdcount;
|
int type, class, buflen, ancount, qdcount;
|
||||||
int haveanswer, had_error;
|
int haveanswer, had_error;
|
||||||
int toobig = 0;
|
|
||||||
char tbuf[MAXDNAME];
|
char tbuf[MAXDNAME];
|
||||||
const char *tname;
|
const char *tname;
|
||||||
int (*name_ok) (const char *);
|
int (*name_ok) (const char *);
|
||||||
@@ -370,15 +354,10 @@ getanswer (const querybuf *answer, int anslen, const char *qname, int qtype)
|
|||||||
bp += sizeof(align) - ((u_long)bp % sizeof(align));
|
bp += sizeof(align) - ((u_long)bp % sizeof(align));
|
||||||
|
|
||||||
if (bp + n >= &hostbuf[sizeof hostbuf]) {
|
if (bp + n >= &hostbuf[sizeof hostbuf]) {
|
||||||
Dprintf("size (%d) too big\n", n);
|
|
||||||
had_error++;
|
had_error++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (hap >= &h_addr_ptrs[MAXADDRS-1]) {
|
if (hap >= &h_addr_ptrs[MAXADDRS-1]) {
|
||||||
if (!toobig++) {
|
|
||||||
Dprintf("Too many addresses (%d)\n",
|
|
||||||
MAXADDRS);
|
|
||||||
}
|
|
||||||
cp += n;
|
cp += n;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -572,7 +551,6 @@ res_gethostbyname2_context (struct resolv_context *ctx,
|
|||||||
&buf.ptr, NULL, NULL, NULL, NULL)) < 0) {
|
&buf.ptr, NULL, NULL, NULL, NULL)) < 0) {
|
||||||
if (buf.buf != origbuf)
|
if (buf.buf != origbuf)
|
||||||
free (buf.buf);
|
free (buf.buf);
|
||||||
Dprintf("res_nsearch failed (%d)\n", n);
|
|
||||||
if (errno == ECONNREFUSED)
|
if (errno == ECONNREFUSED)
|
||||||
return (_gethtbyname2(name, af));
|
return (_gethtbyname2(name, af));
|
||||||
return (NULL);
|
return (NULL);
|
||||||
@@ -671,7 +649,6 @@ res_gethostbyaddr_context (struct resolv_context *ctx,
|
|||||||
if (n < 0) {
|
if (n < 0) {
|
||||||
if (buf.buf != orig_buf)
|
if (buf.buf != orig_buf)
|
||||||
free (buf.buf);
|
free (buf.buf);
|
||||||
Dprintf("res_nquery failed (%d)\n", n);
|
|
||||||
if (errno == ECONNREFUSED)
|
if (errno == ECONNREFUSED)
|
||||||
return (_gethtbyaddr(addr, len, af));
|
return (_gethtbyaddr(addr, len, af));
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
Reference in New Issue
Block a user