aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-10 19:10:36 +0000
committerqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-10 19:10:36 +0000
commitd0a3bbebe46b81bc37f358a8f74d31772ffbaba1 (patch)
tree95eb86295b904f1409d3dd44cd4a1217893cdd0b
parent78c20a03eff65725094986b38e741bd405309274 (diff)
Don't use #if to check if something is defined - use #ifdef instead.
Pointed out by kpfleming git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@74388 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--main/dns.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/main/dns.c b/main/dns.c
index efb2e4475..301610789 100644
--- a/main/dns.c
+++ b/main/dns.c
@@ -177,7 +177,7 @@ static int dns_parse_answer(void *context,
return 0;
}
-#if !HAVE_RES_NINIT
+#ifndef HAVE_RES_NINIT
AST_MUTEX_DEFINE_STATIC(res_lock);
#endif
@@ -189,13 +189,13 @@ int ast_search_dns(void *context,
const char *dname, int class, int type,
int (*callback)(void *context, unsigned char *answer, int len, unsigned char *fullanswer))
{
-#if HAVE_RES_NINIT
+#ifdef HAVE_RES_NINIT
struct __res_state dnsstate;
#endif
unsigned char answer[MAX_SIZE];
int res, ret = -1;
-#if HAVE_RES_NINIT
+#ifdef HAVE_RES_NINIT
res_ninit(&dnsstate);
res = res_nsearch(&dnsstate, dname, class, type, answer, sizeof(answer));
#else
@@ -215,8 +215,8 @@ int ast_search_dns(void *context,
else
ret = 1;
}
-#if HAVE_RES_NINIT
-#if HAVE_RES_NDESTROY
+#ifdef HAVE_RES_NINIT
+#ifdef HAVE_RES_NDESTROY
res_ndestroy(&dnsstate);
#else
res_nclose(&dnsstate);