[asterisk-commits] qwell: branch 1.4 r74388 - /branches/1.4/main/dns.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jul 10 14:10:37 CDT 2007


Author: qwell
Date: Tue Jul 10 14:10:36 2007
New Revision: 74388

URL: http://svn.digium.com/view/asterisk?view=rev&rev=74388
Log:
Don't use #if to check if something is defined - use #ifdef instead.

Pointed out by kpfleming

Modified:
    branches/1.4/main/dns.c

Modified: branches/1.4/main/dns.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/dns.c?view=diff&rev=74388&r1=74387&r2=74388
==============================================================================
--- branches/1.4/main/dns.c (original)
+++ branches/1.4/main/dns.c Tue Jul 10 14:10:36 2007
@@ -177,7 +177,7 @@
 	return 0;
 }
 
-#if !HAVE_RES_NINIT
+#ifndef HAVE_RES_NINIT
 AST_MUTEX_DEFINE_STATIC(res_lock);
 #endif
 
@@ -189,13 +189,13 @@
 	   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 @@
 		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);




More information about the asterisk-commits mailing list