summaryrefslogtreecommitdiffstats
path: root/lib/libc/net/res_query.c
diff options
context:
space:
mode:
authorray <ray@openbsd.org>2007-05-16 04:14:23 +0000
committerray <ray@openbsd.org>2007-05-16 04:14:23 +0000
commitb756865fcb2acd6519009163c2065d316e9ecc39 (patch)
tree63dca875e6e698473d75821e1499ebcb147e14f4 /lib/libc/net/res_query.c
parentAdd missing ssize_t rlen, used when DEBUG is defined, and only (diff)
downloadwireguard-openbsd-b756865fcb2acd6519009163c2065d316e9ecc39.tar.xz
wireguard-openbsd-b756865fcb2acd6519009163c2065d316e9ecc39.zip
Wrap some functions, labels, and variables in #ifdefs corresponding
to #ifdefs where they are used. Found by lint by bret dot lambert at gmail. OK deraadt@.
Diffstat (limited to 'lib/libc/net/res_query.c')
-rw-r--r--lib/libc/net/res_query.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/net/res_query.c b/lib/libc/net/res_query.c
index 32cd04306cb..c8a45a5df5b 100644
--- a/lib/libc/net/res_query.c
+++ b/lib/libc/net/res_query.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: res_query.c,v 1.24 2005/08/06 20:30:04 espie Exp $ */
+/* $OpenBSD: res_query.c,v 1.25 2007/05/16 04:14:23 ray Exp $ */
/*
* ++Copyright++ 1988, 1993
@@ -318,7 +318,9 @@ res_querydomain(const char *name,
u_char *answer, /* buffer to put answer */
int anslen) /* size of answer */
{
+#ifdef DEBUG
struct __res_state *_resp = _THREAD_PRIVATE(_res, _res, &_res);
+#endif
char nbuf[MAXDNAME*2+1+1];
const char *longname = nbuf;
int n;