- Use 'static' and 'extern' keywords where appropriate
authormichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>
Sat, 17 Jan 2015 19:10:47 +0000 (19:10 +0000)
committermichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>
Sat, 17 Jan 2015 19:10:47 +0000 (19:10 +0000)
git-svn-id: svn://svn.ircd-hybrid.org/svnroot/hopm/trunk@5380 82007160-df01-0410-b94d-b575c5fd34c7

src/firedns.c
src/firedns.h

index 49ed14912f88acfaf235d65a4a268dcde8a64177..cb2163869d79a449e4b3f3ee238a27ddaaec4dea 100644 (file)
@@ -48,16 +48,16 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #define min(a,b) (a < b ? a : b)
 
 int fdns_errno = FDNS_ERR_NONE;
-unsigned int fdns_fdinuse = 0;
 
 /* Variables local to this file */
+static unsigned int fdns_fdinuse;
 
 /* up to FDNS_MAX nameservers; populated by firedns_init() */
 static struct in_addr servers4[FDNS_MAX];
+static struct in6_addr servers6[FDNS_MAX];
 /* actual count of nameservers; set by firedns_init() */
 static int i4;
 static int i6;
-static struct in6_addr servers6[FDNS_MAX];
 
 /*
  * Linked list of open DNS queries; populated by firedns_add_query(),
index a332e8465dc3aeff129aa1b1ea183b3ef21a0e92..86caf1132215d536c9f792f459d56a3411977dfc 100644 (file)
@@ -64,26 +64,25 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 /* Used with the above error values */
 extern int fdns_errno;
-extern unsigned int fdns_fdinuse;
 
-void firedns_init(void);
-
-struct firedns_result {
-   char text[1024];
-   char lookup[256];
-   void *info;
+struct firedns_result
+{
+  char text[1024];
+  char lookup[256];
+  void *info;
 };
 
 /* non-blocking functions */
-int firedns_getip(int type, const char * const name, void *info);
-struct firedns_result *firedns_getresult(const int fd);
+extern int firedns_getip(int type, const char * const name, void *info);
+extern struct firedns_result *firedns_getresult(const int fd);
 
 /* low-timeout blocking functions */
-char *firedns_resolveip(int type, const char * const name);
-struct in_addr *firedns_resolveip4(const char * const name);
-struct in6_addr *firedns_resolveip6(const char * const name);
+extern char *firedns_resolveip(int type, const char * const name);
+extern struct in_addr *firedns_resolveip4(const char * const name);
+extern struct in6_addr *firedns_resolveip6(const char * const name);
 
-void firedns_cycle(void);
+extern void firedns_init(void);
+extern void firedns_cycle(void);
 extern const char *firedns_strerror(int);
 
 #endif