Date: Tue, 10 May 2016 07:45:44 +0000 (UTC) From: Baptiste Daroussin <bapt@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r299341 - head/lib/libc/net Message-ID: <201605100745.u4A7jiXJ027113@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bapt Date: Tue May 10 07:45:44 2016 New Revision: 299341 URL: https://svnweb.freebsd.org/changeset/base/299341 Log: Rename dprintf into dbg_printf to avoid collision with dprintf(3) When dprintf(3) in 2009 was added a _WITH_DPRINTF guard has also been added. This rename is made in preparation for the removal of this guard Modified: head/lib/libc/net/gethostbydns.c Modified: head/lib/libc/net/gethostbydns.c ============================================================================== --- head/lib/libc/net/gethostbydns.c Tue May 10 07:42:18 2016 (r299340) +++ head/lib/libc/net/gethostbydns.c Tue May 10 07:45:44 2016 (r299341) @@ -87,7 +87,7 @@ static void addrsort(char **, int, res_s #endif #ifdef DEBUG -static void dprintf(char *, int, res_state) __printflike(1, 0); +static void dbg_printf(char *, int, res_state) __printflike(1, 0); #endif #define MAXPACKET (64*1024) @@ -106,7 +106,7 @@ int _dns_ttl_; #ifdef DEBUG static void -dprintf(char *msg, int num, res_state res) +dbg_printf(char *msg, int num, res_state res) { if (res->options & RES_DEBUG) { int save = errno; @@ -116,7 +116,7 @@ dprintf(char *msg, int num, res_state re } } #else -# define dprintf(msg, num, res) /*nada*/ +# define dbg_printf(msg, num, res) /*nada*/ #endif #define BOUNDED_INCR(x) \ @@ -369,13 +369,13 @@ gethostanswer(const querybuf *answer, in bp += sizeof(align) - ((u_long)bp % sizeof(align)); if (bp + n >= ep) { - dprintf("size (%d) too big\n", n, statp); + dbg_printf("size (%d) too big\n", n, statp); had_error++; continue; } if (hap >= &hed->h_addr_ptrs[_MAXADDRS-1]) { if (!toobig++) - dprintf("Too many addresses (%d)\n", + dbg_printf("Too many addresses (%d)\n", _MAXADDRS, statp); cp += n; continue; @@ -389,7 +389,7 @@ gethostanswer(const querybuf *answer, in } break; default: - dprintf("Impossible condition (type=%d)\n", type, + dbg_printf("Impossible condition (type=%d)\n", type, statp); RES_SET_H_ERRNO(statp, NO_RECOVERY); return (-1); @@ -516,12 +516,12 @@ _dns_gethostbyname(void *rval, void *cb_ n = res_nsearch(statp, name, C_IN, type, buf->buf, sizeof(buf->buf)); if (n < 0) { free(buf); - dprintf("res_nsearch failed (%d)\n", n, statp); + dbg_printf("res_nsearch failed (%d)\n", n, statp); *h_errnop = statp->res_h_errno; return (NS_NOTFOUND); } else if (n > sizeof(buf->buf)) { free(buf); - dprintf("static buffer is too small (%d)\n", n, statp); + dbg_printf("static buffer is too small (%d)\n", n, statp); *h_errnop = statp->res_h_errno; return (NS_UNAVAIL); } @@ -623,13 +623,13 @@ _dns_gethostbyaddr(void *rval, void *cb_ sizeof buf->buf); if (n < 0) { free(buf); - dprintf("res_nquery failed (%d)\n", n, statp); + dbg_printf("res_nquery failed (%d)\n", n, statp); *h_errnop = statp->res_h_errno; return (NS_UNAVAIL); } if (n > sizeof buf->buf) { free(buf); - dprintf("static buffer is too small (%d)\n", n, statp); + dbg_printf("static buffer is too small (%d)\n", n, statp); *h_errnop = statp->res_h_errno; return (NS_UNAVAIL); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605100745.u4A7jiXJ027113>