From: wessels <> Date: Mon, 12 Jan 1998 11:30:35 +0000 (+0000) Subject: gindent X-Git-Tag: SQUID_3_0_PRE1~4213 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=067bea91b4347fedcebf9408fa843d0bd8a684f7;p=thirdparty%2Fsquid.git gindent --- diff --git a/src/asn.cc b/src/asn.cc index 25fe528d68..83cc9ba234 100644 --- a/src/asn.cc +++ b/src/asn.cc @@ -1,5 +1,5 @@ /* - * $Id: asn.cc,v 1.13 1998/01/12 04:29:55 wessels Exp $ + * $Id: asn.cc,v 1.14 1998/01/12 04:30:35 wessels Exp $ * * DEBUG: section 53 AS Number handling * AUTHOR: Duane Wessels, Kostas Anagnostakis @@ -108,7 +108,7 @@ asnMatchIp(void *data, struct in_addr addr) lh = ntohl(addr.s_addr); debug(53, 4) ("asnMatchIp: Called for %s.\n", inet_ntoa(addr)); - if (AS_tree_head == 0 || !memcmp(&addr, &no_addr,sizeof(addr))) + if (AS_tree_head == 0 || !memcmp(&addr, &no_addr, sizeof(addr))) return 0; store_m_int(lh, m_addr); rn = rn_match(m_addr, AS_tree_head); @@ -158,7 +158,7 @@ asnFreeMemory(void) { debug(0, 0) ("asnFreeMemory: Calling asnCleanup()!\n"); - /* XXX - Cleanup is enough. */ + /* XXX - Cleanup is enough. */ asnCleanup(); } @@ -246,7 +246,7 @@ asHandleReply(void *data, char *buf, ssize_t size) while (*s && isspace(*s)) s++; } - /* XXX why assert that ? */ + /* XXX why assert that ? */ #if 0 assert(e->mem_obj->reply); #endif diff --git a/src/cbdata.cc b/src/cbdata.cc index da3ff07470..47b16cda3f 100644 --- a/src/cbdata.cc +++ b/src/cbdata.cc @@ -1,6 +1,6 @@ /* - * $Id: cbdata.cc,v 1.13 1998/01/12 04:29:56 wessels Exp $ + * $Id: cbdata.cc,v 1.14 1998/01/12 04:30:35 wessels Exp $ * * DEBUG: section 45 Callback Data Registry * AUTHOR: Duane Wessels @@ -145,7 +145,7 @@ cbdataFree(void *p) xfree(c); debug(45, 3) ("cbdataFree: freeing %p\n", p); if (mem_type == MEM_NONE) - xfree(p); + xfree(p); else memFree(mem_type, p); } @@ -179,7 +179,7 @@ cbdataUnlock(const void *p) cbdataCount--; xfree(c); debug(45, 3) ("cbdataUnlock: Freeing %p\n", p); - xfree((void *)p); + xfree((void *) p); } int diff --git a/src/client.cc b/src/client.cc index 4477ac5825..10115aecdd 100644 --- a/src/client.cc +++ b/src/client.cc @@ -1,5 +1,6 @@ + /* - * $Id: client.cc,v 1.48 1998/01/06 00:27:56 wessels Exp $ + * $Id: client.cc,v 1.49 1998/01/12 04:30:36 wessels Exp $ * * DEBUG: section 0 WWW Client * AUTHOR: Harvest Derived diff --git a/src/debug.cc b/src/debug.cc index 5d1ffdbe1f..6e18f31c24 100644 --- a/src/debug.cc +++ b/src/debug.cc @@ -1,6 +1,6 @@ /* - * $Id: debug.cc,v 1.56 1998/01/07 22:45:25 wessels Exp $ + * $Id: debug.cc,v 1.57 1998/01/12 04:30:36 wessels Exp $ * * DEBUG: section 0 Debug Routines * AUTHOR: Harvest Derived @@ -164,7 +164,7 @@ _db_print(va_alist) fflush(debug_log); if (opt_debug_stderr && debug_log != stderr) { #if defined(__QNX__) - vfprintf(stderr, f, eargs); + vfprintf(stderr, f, eargs); #else vfprintf(stderr, f, args); #endif diff --git a/src/dns.cc b/src/dns.cc index 9d20d356dc..7e2d97798e 100644 --- a/src/dns.cc +++ b/src/dns.cc @@ -1,6 +1,6 @@ /* - * $Id: dns.cc,v 1.50 1998/01/12 04:29:59 wessels Exp $ + * $Id: dns.cc,v 1.51 1998/01/12 04:30:36 wessels Exp $ * * DEBUG: section 34 Dnsserver interface * AUTHOR: Harvest Derived @@ -202,7 +202,7 @@ dnsOpenServer(const char *command) * -- Michael O'Reilly */ if (fd > 2) - close(fd); + close(fd); close(cfd); if (Config.onoff.res_defnames) execlp(command, "(dnsserver)", "-D", NULL); diff --git a/src/enums.h b/src/enums.h index 3ef94dc29e..f4d8622f7b 100644 --- a/src/enums.h +++ b/src/enums.h @@ -376,80 +376,81 @@ enum { SNMP_C_USER, SNMP_C_COMMUNITY }; + #endif typedef enum { - MEM_NONE, - MEM_DISK_BUF, - MEM_STMEM_BUF, - MEM_4K_BUF, - MEM_8K_BUF, - MEM_ACL_IP_DATA, - MEM_ACL_TIME_DATA, - MEM_ACL_NAME_LIST, - MEM_ACL_DENY_INFO_LIST, - MEM_ACL, + MEM_NONE, + MEM_DISK_BUF, + MEM_STMEM_BUF, + MEM_4K_BUF, + MEM_8K_BUF, + MEM_ACL_IP_DATA, + MEM_ACL_TIME_DATA, + MEM_ACL_NAME_LIST, + MEM_ACL_DENY_INFO_LIST, + MEM_ACL, #if SQUID_SNMP - MEM_SNMPCONF, + MEM_SNMPCONF, #endif - MEM_ACL_LIST, - MEM_ACL_ACCESS, - MEM_ACLCHECK_T, - MEM_AIO_RESULT_T, - MEM_WORDLIST, - MEM_INTLIST, - MEM_USHORTLIST, - MEM_RELIST, - MEM_SQUIDCONFIG, - MEM_SQUIDCONFIG2, - MEM_CLOSE_HANDLER, - MEM_DREAD_CTRL, - MEM_DNSSERVER_T, - MEM_DNSSTATDATA, - MEM_DWRITE_Q, - MEM_FILEMAP, - MEM_FQDNCACHE_ENTRY, - MEM_HASH_LINK, - MEM_HASH_TABLE, - MEM_HTTP_REPLY, - MEM_HTTPSTATEDATA, - MEM_ICPUDPDATA, - MEM_CLIENTHTTPREQUEST, - MEM_CONNSTATEDATA, - MEM_IPCACHE_ADDRS, - MEM_IPCACHE_ENTRY, - MEM_DOMAIN_PING, - MEM_DOMAIN_TYPE, - MEM_PEER, - MEM_NET_DB_NAME, - MEM_NET_DB_PEER, - MEM_NETDBENTRY, - MEM_ICP_PING_DATA, - MEM_PS_STATE, - MEM_HIERARCHYLOGENTRY, - MEM_PINGERECHODATA, - MEM_PINGERREPLYDATA, - MEM_ICP_COMMON_T, - MEM_PROTO_STAT, - MEM_META_DATA, - MEM_CACHEINFO, - MEM_IOSTATS, - MEM_MEM_NODE, - MEM_MEM_HDR, - MEM_STORE_CLIENT, - MEM_MEMOBJECT, - MEM_STOREENTRY, - MEM_SWAPDIR, - MEM_REQUEST_T, - MEM_ACCESSLOGENTRY, - MEM_CACHEMGR_PASSWD, - MEM_REFRESH_T, - MEM_COMMWRITESTATEDATA, - MEM_ERRORSTATE, - MEM_DLINK_NODE, - MEM_DLINK_LIST, - MEM_STATCOUNTERS, - MEM_MAX + MEM_ACL_LIST, + MEM_ACL_ACCESS, + MEM_ACLCHECK_T, + MEM_AIO_RESULT_T, + MEM_WORDLIST, + MEM_INTLIST, + MEM_USHORTLIST, + MEM_RELIST, + MEM_SQUIDCONFIG, + MEM_SQUIDCONFIG2, + MEM_CLOSE_HANDLER, + MEM_DREAD_CTRL, + MEM_DNSSERVER_T, + MEM_DNSSTATDATA, + MEM_DWRITE_Q, + MEM_FILEMAP, + MEM_FQDNCACHE_ENTRY, + MEM_HASH_LINK, + MEM_HASH_TABLE, + MEM_HTTP_REPLY, + MEM_HTTPSTATEDATA, + MEM_ICPUDPDATA, + MEM_CLIENTHTTPREQUEST, + MEM_CONNSTATEDATA, + MEM_IPCACHE_ADDRS, + MEM_IPCACHE_ENTRY, + MEM_DOMAIN_PING, + MEM_DOMAIN_TYPE, + MEM_PEER, + MEM_NET_DB_NAME, + MEM_NET_DB_PEER, + MEM_NETDBENTRY, + MEM_ICP_PING_DATA, + MEM_PS_STATE, + MEM_HIERARCHYLOGENTRY, + MEM_PINGERECHODATA, + MEM_PINGERREPLYDATA, + MEM_ICP_COMMON_T, + MEM_PROTO_STAT, + MEM_META_DATA, + MEM_CACHEINFO, + MEM_IOSTATS, + MEM_MEM_NODE, + MEM_MEM_HDR, + MEM_STORE_CLIENT, + MEM_MEMOBJECT, + MEM_STOREENTRY, + MEM_SWAPDIR, + MEM_REQUEST_T, + MEM_ACCESSLOGENTRY, + MEM_CACHEMGR_PASSWD, + MEM_REFRESH_T, + MEM_COMMWRITESTATEDATA, + MEM_ERRORSTATE, + MEM_DLINK_NODE, + MEM_DLINK_LIST, + MEM_STATCOUNTERS, + MEM_MAX } mem_type; enum { diff --git a/src/fqdncache.cc b/src/fqdncache.cc index c2b250daeb..d8184ee942 100644 --- a/src/fqdncache.cc +++ b/src/fqdncache.cc @@ -1,6 +1,6 @@ /* - * $Id: fqdncache.cc,v 1.77 1998/01/06 05:15:40 wessels Exp $ + * $Id: fqdncache.cc,v 1.78 1998/01/12 04:30:37 wessels Exp $ * * DEBUG: section 35 FQDN Cache * AUTHOR: Harvest Derived @@ -488,19 +488,19 @@ fqdncache_dnsHandleRead(int fd, void *data) } fqdncacheUnlockEntry(f); /* unlock from FQDN_DISPATCHED */ } else { - debug(14, 5) ("fqdncache_dnsHandleRead: Incomplete reply\n"); - commSetSelect(fd, - COMM_SELECT_READ, - fqdncache_dnsHandleRead, - dnsData, - 0); + debug(14, 5) ("fqdncache_dnsHandleRead: Incomplete reply\n"); + commSetSelect(fd, + COMM_SELECT_READ, + fqdncache_dnsHandleRead, + dnsData, + 0); } if (dnsData->offset == 0) { dnsData->data = NULL; EBIT_CLR(dnsData->flags, HELPER_BUSY); - if (EBIT_TEST(dnsData->flags, HELPER_SHUTDOWN)) - dnsShutdownServer(dnsData); - cbdataUnlock(dnsData); + if (EBIT_TEST(dnsData->flags, HELPER_SHUTDOWN)) + dnsShutdownServer(dnsData); + cbdataUnlock(dnsData); } fqdncacheNudgeQueue(); } diff --git a/src/ftp.cc b/src/ftp.cc index 41d9cbdefd..1d0073b823 100644 --- a/src/ftp.cc +++ b/src/ftp.cc @@ -1,6 +1,6 @@ /* - * $Id: ftp.cc,v 1.186 1998/01/12 04:30:01 wessels Exp $ + * $Id: ftp.cc,v 1.187 1998/01/12 04:30:38 wessels Exp $ * * DEBUG: section 9 File Transfer Protocol (FTP) * AUTHOR: Harvest Derived @@ -564,7 +564,6 @@ ftpHtmlifyListEntry(char *line, int flags) *(parts->showname + width - 0) = '\0'; } } - switch (parts->type) { case 'd': snprintf(icon, 2048, "\"%-6s\"", diff --git a/src/globals.h b/src/globals.h index ee1642c541..ce42ca8d15 100644 --- a/src/globals.h +++ b/src/globals.h @@ -1,6 +1,6 @@ /* - * $Id: globals.h,v 1.26 1998/01/12 04:30:01 wessels Exp $ + * $Id: globals.h,v 1.27 1998/01/12 04:30:39 wessels Exp $ */ extern FILE *debug_log; /* NULL */ @@ -99,7 +99,7 @@ extern StatCounters Counter; extern char *err_type_str[]; extern char *icp_opcode_str[]; extern struct radix_node_head *AS_tree_head; -extern double request_failure_ratio; /* 0.0 */ +extern double request_failure_ratio; /* 0.0 */ #ifdef HAVE_SYSLOG extern int _db_level; diff --git a/src/http.cc b/src/http.cc index 0af047baa8..c95492e9d1 100644 --- a/src/http.cc +++ b/src/http.cc @@ -1,6 +1,6 @@ /* - * $Id: http.cc,v 1.233 1998/01/12 04:30:03 wessels Exp $ + * $Id: http.cc,v 1.234 1998/01/12 04:30:39 wessels Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -815,9 +815,9 @@ httpBuildRequestHeader(request_t * request, if (EBIT_TEST(request->flags, REQ_USED_PROXY_AUTH)) continue; if (strncasecmp(xbuf, "Connection:", 11) == 0) { - handleConnectionHeader(0, no_forward, &xbuf[11]); + handleConnectionHeader(0, no_forward, &xbuf[11]); continue; - } + } if (strncasecmp(xbuf, "Host:", 5) == 0) { EBIT_SET(hdr_flags, HDR_HOST); } else if (strncasecmp(xbuf, "Cache-Control:", 14) == 0) { @@ -846,7 +846,7 @@ httpBuildRequestHeader(request_t * request, snprintf(xbuf, 4096, "Max-Forwards: %d", n - 1); } } - if (!handleConnectionHeader(1, no_forward, xbuf)) + if (!handleConnectionHeader(1, no_forward, xbuf)) httpAppendRequestHeader(hdr_out, xbuf, &len, out_sz - 512, 1); } hdr_len = t - hdr_in; diff --git a/src/icp_v2.cc b/src/icp_v2.cc index b99f401e1b..7277ae010d 100644 --- a/src/icp_v2.cc +++ b/src/icp_v2.cc @@ -191,9 +191,9 @@ icpHandleIcpV2(int fd, struct sockaddr_in from, char *buf, int len) debug(12, 5) ("icpHandleIcpV2: OPCODE %s\n", icp_opcode_str[header.opcode]); if (icpCheckUdpHit(entry, icp_request)) { pkt_len = sizeof(icp_common_t) + strlen(url) + 1 + 2 + entry->object_len; - reply = icpCreateMessage(ICP_HIT, flags, url, header.reqnum, src_rtt); - icpUdpSend(fd, &from, reply, LOG_UDP_HIT, icp_request->protocol); - break; + reply = icpCreateMessage(ICP_HIT, flags, url, header.reqnum, src_rtt); + icpUdpSend(fd, &from, reply, LOG_UDP_HIT, icp_request->protocol); + break; } /* if store is rebuilding, return a UDP_HIT, but not a MISS */ if (store_rebuilding && opt_reload_hit_only) { diff --git a/src/main.cc b/src/main.cc index 427254c49c..d80ce02feb 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1,6 +1,6 @@ /* - * $Id: main.cc,v 1.207 1998/01/12 04:30:05 wessels Exp $ + * $Id: main.cc,v 1.208 1998/01/12 04:30:40 wessels Exp $ * * DEBUG: section 1 Startup and Main Loop * AUTHOR: Harvest Derived @@ -383,7 +383,7 @@ mainReconfigure(void) debug(1, 0) ("Ready to serve requests.\n"); } -static void +static void setEffectiveUser(void) { leave_suid(); /* Run as non privilegied user */ @@ -547,15 +547,15 @@ main(int argc, char **argv) /* NOTREACHED */ } if (opt_create_swap_dirs) { - if (ConfigFile == NULL) - ConfigFile = xstrdup(DefaultConfigFile); - cbdataInit(); - parseConfigFile(ConfigFile); - setEffectiveUser(); - debug(0, 0)("Creating Swap Directories\n"); - storeCreateSwapDirectories(); - return 0; - } + if (ConfigFile == NULL) + ConfigFile = xstrdup(DefaultConfigFile); + cbdataInit(); + parseConfigFile(ConfigFile); + setEffectiveUser(); + debug(0, 0) ("Creating Swap Directories\n"); + storeCreateSwapDirectories(); + return 0; + } if (!opt_no_daemon) watch_child(argv); setMaxFD(); diff --git a/src/mime.cc b/src/mime.cc index 0d46ebb885..70380d9337 100644 --- a/src/mime.cc +++ b/src/mime.cc @@ -1,5 +1,6 @@ + /* - * $Id: mime.cc,v 1.45 1998/01/12 04:30:05 wessels Exp $ + * $Id: mime.cc,v 1.46 1998/01/12 04:30:41 wessels Exp $ * * DEBUG: section 25 MIME Parsing * AUTHOR: Harvest Derived