From: wessels <> Date: Sat, 19 Oct 1996 02:36:21 +0000 (+0000) Subject: misc cleanup X-Git-Tag: SQUID_3_0_PRE1~5631 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cb0486c31a4c59d85ec0c6179c9914d85f396dfb;p=thirdparty%2Fsquid.git misc cleanup --- diff --git a/src/acl.cc b/src/acl.cc index 196e892f1c..ede9f4e27b 100644 --- a/src/acl.cc +++ b/src/acl.cc @@ -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; } diff --git a/src/dnsserver.cc b/src/dnsserver.cc index e52b510426..cd1b659d75 100644 --- a/src/dnsserver.cc +++ b/src/dnsserver.cc @@ -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); diff --git a/src/main.cc b/src/main.cc index c9d83b5be5..5fef5a1c1e 100644 --- a/src/main.cc +++ b/src/main.cc @@ -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; diff --git a/src/stat.cc b/src/stat.cc index 598b40cf11..b4df2d01ce 100644 --- a/src/stat.cc +++ b/src/stat.cc @@ -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); diff --git a/src/store.cc b/src/store.cc index 4db602f39d..c61764d9b8 100644 --- a/src/store.cc +++ b/src/store.cc @@ -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;