Remove two unused functions from res_adns.c, so that CFLAGS=-Wall
authorMichael Poole <mdpoole@troilus.org>
Wed, 19 May 2004 01:33:04 +0000 (01:33 +0000)
committerMichael Poole <mdpoole@troilus.org>
Wed, 19 May 2004 01:33:04 +0000 (01:33 +0000)
generates no errors.

git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1072 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/res_adns.c

index 584a95fc97df931114509591deb11097e4d69aa3..69dc3eba1ecfe1f41cbaabcb21e81a9ddd81b05b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-05-18  Michael Poole <mdpoole@troilus.org>
+
+       * ircd/res_adns.c (res_ourserver): Remove unused function.
+       (validate_name): Likewise.
+
 2004-05-17  Michael Poole <mdpoole@troilus.org>
 
        * include/ircd_features.h, ircd/ircd_features.c, ircd/s_debug.c:
index 1dcc4473290ab6505f731c719623c96092c45822..d64ea6b824f14b11464b91c8222c25962bc679ce 100644 (file)
@@ -216,35 +216,6 @@ static struct  resinfo {
 } reinfo;
 
 
-/*
- * int
- * res_isourserver(ina)
- *      looks up "ina" in _res.ns_addr_list[]
- * returns:
- *      0  : not found
- *      >0 : found
- * author:
- *      paul vixie, 29may94
- */
-static int
-res_ourserver(const struct __res_state* statp, const struct sockaddr_in* inp) 
-{
-  struct sockaddr_in ina;
-  int ns;
-
-  ina = *inp;
-  for (ns = 0;  ns < statp->nscount;  ns++) {
-    const struct sockaddr_in *srv = &statp->nsaddr_list[ns];
-
-    if (srv->sin_family == ina.sin_family &&
-         srv->sin_port == ina.sin_port &&
-         (srv->sin_addr.s_addr == INADDR_ANY ||
-          srv->sin_addr.s_addr == ina.sin_addr.s_addr))
-             return (1);
-  }
-  return (0);
-}
-
 /* Socket callback for resolver */
 static void res_socket_callback(struct Event* ev)
 {
@@ -527,21 +498,6 @@ static void do_query_number(const struct DNSQuery* query,
   timer_chg(&resExpireDNS, TT_RELATIVE, 1);
 }
 
-/* Returns true if this is a valid name */
-static int validate_name(char *name)
-{
-  while (*name) {
-    if ((*name<'A' || *name>'Z') 
-     && (*name<'a' || *name>'z') 
-     && (*name<'0' || *name>'9')
-     && (*name!='-')) {
-      return 0;
-    }
-    name++;
-  }
-  return 1;
-}
-
 /*
  * dup_hostent - Duplicate a hostent struct, allocate only enough memory for
  * the data we're putting in it.