From dfadc2d05f82198391a7a683a8816ec446a9fd42 Mon Sep 17 00:00:00 2001 From: michael Date: Sat, 17 Jan 2015 19:10:47 +0000 Subject: [PATCH] - Use 'static' and 'extern' keywords where appropriate git-svn-id: svn://svn.ircd-hybrid.org/svnroot/hopm/trunk@5380 82007160-df01-0410-b94d-b575c5fd34c7 --- src/firedns.c | 4 ++-- src/firedns.h | 25 ++++++++++++------------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src/firedns.c b/src/firedns.c index 49ed149..cb21638 100644 --- a/src/firedns.c +++ b/src/firedns.c @@ -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(), diff --git a/src/firedns.h b/src/firedns.h index a332e84..86caf11 100644 --- a/src/firedns.h +++ b/src/firedns.h @@ -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 -- 2.30.2