From e62d2dea923a18c84eaeb5aaaa36fad80e9ddaf4 Mon Sep 17 00:00:00 2001 From: wessels <> Date: Tue, 13 Aug 1996 05:22:33 +0000 Subject: [PATCH] gindent --- src/comm.cc | 4 ++-- src/dns.cc | 8 ++++---- src/fqdncache.cc | 5 +++-- src/stat.cc | 7 +++---- src/store.cc | 18 +++++++++++------- src/url.cc | 4 ++-- 6 files changed, 25 insertions(+), 21 deletions(-) diff --git a/src/comm.cc b/src/comm.cc index be0982ae93..d87ea9e70e 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -1,7 +1,7 @@ /* - * $Id: comm.cc,v 1.50 1996/08/12 23:21:43 wessels Exp $ + * $Id: comm.cc,v 1.51 1996/08/12 23:22:33 wessels Exp $ * * DEBUG: section 5 Socket Functions * AUTHOR: Harvest Derived @@ -330,7 +330,7 @@ int comm_connect(sock, dest_host, dest_port) xmemcpy(&to_addr.sin_addr, hp->h_addr, hp->h_length); to_addr.sin_port = htons(dest_port); if (Config.Log.log_fqdn) - fqdncache_gethostbyaddr(to_addr.sin_addr, FQDN_LOOKUP_IF_MISS); + fqdncache_gethostbyaddr(to_addr.sin_addr, FQDN_LOOKUP_IF_MISS); return comm_connect_addr(sock, &to_addr); } diff --git a/src/dns.cc b/src/dns.cc index e68bd906b3..1dc5e5ffde 100644 --- a/src/dns.cc +++ b/src/dns.cc @@ -1,5 +1,5 @@ /* - * $Id: dns.cc,v 1.3 1996/08/12 23:21:29 wessels Exp $ + * $Id: dns.cc,v 1.4 1996/08/12 23:22:34 wessels Exp $ * * DEBUG: section 34 Dnsserver interface * AUTHOR: Harvest Derived @@ -271,15 +271,15 @@ void dnsShutdownServers() for (k = 0; k < NDnsServersAlloc; k++) { dnsData = *(dns_child_table + k); if (!(dnsData->flags & DNS_FLAG_ALIVE)) { - debug(34, 3, "dnsShutdownServers: #%d is NOT ALIVE.\n", dnsData->id); + debug(34, 3, "dnsShutdownServers: #%d is NOT ALIVE.\n", dnsData->id); continue; } if (dnsData->flags & DNS_FLAG_BUSY) { - debug(34, 3, "dnsShutdownServers: #%d is BUSY.\n", dnsData->id); + debug(34, 3, "dnsShutdownServers: #%d is BUSY.\n", dnsData->id); continue; } if (dnsData->flags & DNS_FLAG_CLOSING) { - debug(34, 3, "dnsShutdownServers: #%d is CLOSING.\n", dnsData->id); + debug(34, 3, "dnsShutdownServers: #%d is CLOSING.\n", dnsData->id); continue; } debug(34, 3, "dnsShutdownServers: sending '$shutdown' to dnsserver #%d\n", dnsData->id); diff --git a/src/fqdncache.cc b/src/fqdncache.cc index 7635cf1a42..5275ae43bd 100644 --- a/src/fqdncache.cc +++ b/src/fqdncache.cc @@ -1,6 +1,6 @@ /* - * $Id: fqdncache.cc,v 1.6 1996/07/26 19:43:56 wessels Exp $ + * $Id: fqdncache.cc,v 1.7 1996/08/12 23:22:35 wessels Exp $ * * DEBUG: section 35 FQDN Cache * AUTHOR: Harvest Derived @@ -849,7 +849,6 @@ static void fqdncache_dnsDispatch(dns, f) /* initialize the fqdncache */ void fqdncache_init() { - debug(35, 3, "Initializing FQDN Cache...\n"); memset(&FqdncacheStats, '\0', sizeof(FqdncacheStats)); @@ -904,6 +903,8 @@ char *fqdncache_gethostbyaddr(addr, flags) struct hostent *hp = NULL; unsigned int ip; + if (fqdn_table == 0) + return NULL; if (!name) fatal_dump("fqdncache_gethostbyaddr: NULL name"); FqdncacheStats.requests++; diff --git a/src/stat.cc b/src/stat.cc index 92aadc58ba..284554190d 100644 --- a/src/stat.cc +++ b/src/stat.cc @@ -1,5 +1,5 @@ /* - * $Id: stat.cc,v 1.51 1996/07/27 07:07:46 wessels Exp $ + * $Id: stat.cc,v 1.52 1996/08/12 23:22:37 wessels Exp $ * * DEBUG: section 18 Cache Manager Statistics * AUTHOR: Harvest Derived @@ -906,7 +906,6 @@ void log_append(obj, url, caddr, size, action, method, http_code, msec, ident, h hier_host = hierData->host; hier_timeout = hierData->timeout; } - if (obj->logfile_status == LOG_ENABLE) { if (Config.commonLogFormat) sprintf(tmp, "%s %s - [%s] \"%s %s\" %s %d\n", @@ -1150,7 +1149,7 @@ char *stat_describe(entry) LOCAL_ARRAY(char, state, 256); state[0] = '\0'; - sprintf (state, "%s/%s", + sprintf(state, "%s/%s", storeStatusStr[entry->store_status], pingStatusStr[entry->ping_status]); return (state); @@ -1162,7 +1161,7 @@ char *mem_describe(entry) LOCAL_ARRAY(char, where, 100); where[0] = '\0'; - sprintf (where, "D%d/%s/%s", + sprintf(where, "D%d/%s/%s", entry->swap_file_number, swapStatusStr[entry->swap_status], memStatusStr[entry->mem_status]); diff --git a/src/store.cc b/src/store.cc index 0f1e7e5746..04c5902154 100644 --- a/src/store.cc +++ b/src/store.cc @@ -1,5 +1,5 @@ /* - * $Id: store.cc,v 1.77 1996/07/26 21:09:40 wessels Exp $ + * $Id: store.cc,v 1.78 1996/08/12 23:22:38 wessels Exp $ * * DEBUG: section 20 Storeage Manager * AUTHOR: Harvest Derived @@ -158,26 +158,30 @@ static char *storeLogTags[] = "RELEASE" }; -char *memStatusStr[] = { +char *memStatusStr[] = +{ "NOT_IN_MEMORY", "SWAPPING_IN", "IN_MEMORY" }; -char *pingStatusStr[] = { +char *pingStatusStr[] = +{ "PING_WAITING", "PING_TIMEOUT", "PING_DONE", "PING_NONE" }; -char *storeStatusStr[] = { +char *storeStatusStr[] = +{ "STORE_OK", "STORE_PENDING", "STORE_ABORTED" }; -char *swapStatusStr[] = { +char *swapStatusStr[] = +{ "NO_SWAP", "SWAPPING_OUT", "SWAP_OK" @@ -883,8 +887,8 @@ int storeRegister(e, fd, handler, data) /* allocate, and copy old pending list over to the new one */ tmp = xcalloc(mem->pending_list_size, sizeof(struct pentry *)); - for (j = 0; j < old_size; j++) - tmp[j] = mem->pending[j]; + for (j = 0; j < old_size; j++) + tmp[j] = mem->pending[j]; /* free the old list and set the new one */ safe_free(mem->pending); diff --git a/src/url.cc b/src/url.cc index eae39a0eed..ded138f28c 100644 --- a/src/url.cc +++ b/src/url.cc @@ -1,6 +1,6 @@ /* - * $Id: url.cc,v 1.27 1996/07/27 07:07:47 wessels Exp $ + * $Id: url.cc,v 1.28 1996/08/12 23:22:39 wessels Exp $ * * DEBUG: section 23 URL Parsing * AUTHOR: Duane Wessels @@ -278,7 +278,7 @@ void requestUnlink(request) if (request == NULL) return; request->link_count--; - if (request->link_count) + if (request->link_count) return; safe_free(request->hierarchy.host); put_free_request_t(request); -- 2.47.2