]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
misc cleanup
authorwessels <>
Sat, 19 Oct 1996 02:36:21 +0000 (02:36 +0000)
committerwessels <>
Sat, 19 Oct 1996 02:36:21 +0000 (02:36 +0000)
src/acl.cc
src/dnsserver.cc
src/main.cc
src/stat.cc
src/store.cc

index 196e892f1cdb652e42c4a9172e970ab79069ca38..ede9f4e27b88f7225c0d3b46c7c64c582615bd73 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: acl.cc,v 1.51 1996/10/15 04:58:23 wessels Exp $
+ * $Id: acl.cc,v 1.52 1996/10/18 20:36:21 wessels Exp $
  *
  * DEBUG: section 28    Access Control
  * AUTHOR: Duane Wessels
@@ -262,7 +262,8 @@ decode_addr(char *asc, struct in_addr *addr, struct in_addr *mask)
 static struct _acl_ip_data *
 aclParseIpList(void)
 {
-    char *t = NULL, *p = NULL;
+    char *t = NULL;
+    char *p = NULL;
     struct _acl_ip_data *head = NULL;
     struct _acl_ip_data **Tail = &head;
     struct _acl_ip_data *q = NULL;
@@ -283,11 +284,11 @@ aclParseIpList(void)
            memset(mask, 0, sizeof(mask));
 
            /* Split the adress in addr1-addr2/mask */
-           strncpy(addr1, p, strcspn(t, "-/"));
-           p += strcspn(t, "-/");
+           strncpy(addr1, p, strcspn(p, "-/"));
+           p += strcspn(p, "-/");
            if (*p == '-') {
                p++;
-               strncpy(addr2, p, strcspn(t, "/"));
+               strncpy(addr2, p, strcspn(p, "/"));
                p += strcspn(p, "/");
            }
            if (*p == '/') {
@@ -306,7 +307,7 @@ aclParseIpList(void)
            if (*addr2 && !decode_addr(addr2, &q->addr2, &q->mask)) {
                debug(28, 0, "%s line %d: %s\n",
                    cfg_filename, config_lineno, config_input_line);
-               debug(28, 0, "aclParseIpList: Ignoring invalid IP acl entry: unknown second address '%s'\n", addr1);
+               debug(28, 0, "aclParseIpList: Ignoring invalid IP acl entry: unknown second address '%s'\n", addr2);
                safe_free(q);
                continue;
            }
index e52b5104265234935313dcf7cb07e3f38893fe59..cd1b659d75aa9309c344d2989373c6da7d1a35de 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: dnsserver.cc,v 1.25 1996/10/09 15:34:24 wessels Exp $
+ * $Id: dnsserver.cc,v 1.26 1996/10/18 20:36:22 wessels Exp $
  *
  * DEBUG: section 0     DNS Resolver
  * AUTHOR: Harvest Derived
@@ -286,7 +286,7 @@ main(int argc, char *argv[])
        }
     }
 
-    while (1) {
+    for (;;) {
        int retry_count = 0;
        int addrbuf;
        memset(request, '\0', 256);
index c9d83b5be5a65f3f26cf54c933aa28c206904145..5fef5a1c1eefcb25578c22a1e97f069011101e78 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: main.cc,v 1.96 1996/10/15 04:57:54 wessels Exp $
+ * $Id: main.cc,v 1.97 1996/10/18 20:36:24 wessels Exp $
  *
  * DEBUG: section 1     Startup and Main Loop
  * AUTHOR: Harvest Derived
@@ -541,7 +541,7 @@ mainInitialize(void)
        next_cleaning = squid_curtime + Config.cleanRate;
        next_maintain = squid_curtime + 0;
        next_dirclean = squid_curtime + 15;
-       next_announce = squid_curtime + Config.Announce.rate;
+       next_announce = squid_curtime + 3600;
        next_ip_purge = squid_curtime + 10;
     }
     first_time = 0;
index 598b40cf1106b6fffb24f344906535920ac102ea..b4df2d01ce9957be921b3cc33a052f0d629d29b6 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: stat.cc,v 1.89 1996/10/17 11:14:48 wessels Exp $
+ * $Id: stat.cc,v 1.90 1996/10/18 20:36:25 wessels Exp $
  *
  * DEBUG: section 18    Cache Manager Statistics
  * AUTHOR: Harvest Derived
@@ -750,7 +750,7 @@ info_get(cacheinfo * obj, StoreEntry * sentry)
 
     f = (float) (squid_curtime - squid_starttime);
     storeAppendPrintf(sentry, "{\tConnections per hour:\t%.1f}\n",
-       f == 0.0 ? 0.0 : ((ntcpconn + nudpconn) / (f / 3600)));
+       f == 0.0 ? 0.0 : ((ntcpconn + nudpconn) / (f / 3600.0)));
 
     storeAppendPrintf(sentry, "{Cache information for %s:}\n",
        appname);
index 4db602f39db4247a220577ee6ea412c27370ebec..c61764d9b8d7af9248c019b051560f68a85085bc 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store.cc,v 1.132 1996/10/17 11:14:50 wessels Exp $
+ * $Id: store.cc,v 1.133 1996/10/18 20:36:26 wessels Exp $
  *
  * DEBUG: section 20    Storeage Manager
  * AUTHOR: Harvest Derived
@@ -256,7 +256,7 @@ static int store_pages_high = 0;
 static int store_pages_low = 0;
 
 /* current file name, swap file, use number as a filename */
-static unsigned long swapfileno = 0;
+static int swapfileno = 0;
 static int store_swap_size = 0;        /* kilobytes !! */
 static unsigned long store_swap_high = 0;
 static unsigned long store_swap_low = 0;