--------------------- PatchSet 2987 Date: 2001/09/09 12:02:44 Author: serassio Branch: nt-2_3-tolsty Tag: (none) Log: Fixed indent problems Members: src/MemPool.c:1.1.1.3.4.1.2.1.2.1->1.1.1.3.4.1.2.1.2.2 src/Packer.c:1.1.1.2.4.1.2.1.2.1->1.1.1.2.4.1.2.1.2.2 src/mem.c:1.1.1.3.4.1.2.1.2.1->1.1.1.3.4.1.2.1.2.2 src/net_db.c:1.1.1.3.4.1.2.1.2.1->1.1.1.3.4.1.2.1.2.2 Index: squid/src/MemPool.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/MemPool.c,v retrieving revision 1.1.1.3.4.1.2.1.2.1 retrieving revision 1.1.1.3.4.1.2.1.2.2 diff -u -r1.1.1.3.4.1.2.1.2.1 -r1.1.1.3.4.1.2.1.2.2 --- squid/src/MemPool.c 27 Aug 2001 21:48:19 -0000 1.1.1.3.4.1.2.1.2.1 +++ squid/src/MemPool.c 9 Sep 2001 12:02:44 -0000 1.1.1.3.4.1.2.1.2.2 @@ -1,5 +1,6 @@ + /* - * $Id: MemPool.c,v 1.1.1.3.4.1.2.1.2.1 2001/08/27 21:48:19 tolsty Exp $ + * $Id: MemPool.c,v 1.1.1.3.4.1.2.1.2.2 2001/09/09 12:02:44 serassio Exp $ * * DEBUG: section 63 Low Level Memory Pool Management * AUTHOR: Alex Rousskov @@ -49,7 +50,8 @@ /* memory pool accounting */ static MemPoolMeter TheMeter; -static gb_t mem_traffic_volume = { 0, 0 }; +static gb_t mem_traffic_volume = +{0, 0}; static Stack Pools; /* local prototypes */ @@ -91,8 +93,7 @@ new_pool_limit = mem_unlimited_size; /* shrink memory pools if needed */ if (TheMeter.idle.level > new_pool_limit) { - debug(63, 1) ("Shrinking idle mem pools to %.2f MB\n", - toMB(new_pool_limit)); + debug(63, 1) ("Shrinking idle mem pools to %.2f MB\n", toMB(new_pool_limit)); memShrink(new_pool_limit); } assert(TheMeter.idle.level <= new_pool_limit); @@ -141,18 +142,14 @@ /* first phase: cut proportionally to the pool idle size */ for (i = 0; i < Pools.count && TheMeter.idle.level > new_limit; ++i) { MemPool *pool = Pools.items[i]; - const ssize_t target_pool_size = - (size_t) ((double) pool->meter.idle.level * new_limit) / - start_limit; + const ssize_t target_pool_size = (size_t) ((double) pool->meter.idle.level * new_limit) / start_limit; memPoolShrink(pool, target_pool_size); } - debug(63, 1) ("memShrink: 1st phase done with %d KB left\n", - toKB(TheMeter.idle.level)); + debug(63, 1) ("memShrink: 1st phase done with %d KB left\n", toKB(TheMeter.idle.level)); /* second phase: cut to 0 */ for (i = 0; i < Pools.count && TheMeter.idle.level > new_limit; ++i) memPoolShrink(Pools.items[i], 0); - debug(63, 1) ("memShrink: 2nd phase done with %d KB left\n", - toKB(TheMeter.idle.level)); + debug(63, 1) ("memShrink: 2nd phase done with %d KB left\n", toKB(TheMeter.idle.level)); assert(TheMeter.idle.level <= new_limit); /* paranoid */ } @@ -163,28 +160,27 @@ int alloc_count, int inuse_count, int idle_count, StoreEntry * e) { assert(pm); - storeAppendPrintf(e, - "%d\t %d\t %d\t %.2f\t %d\t %d\t %d\t %d\t %d\t %d\t %d\t %d\t %d\t %d\t %d\n", - /* alloc */ + storeAppendPrintf(e, "%d\t %d\t %d\t %.2f\t %d\t %d\t %d\t %d\t %d\t %d\t %d\t %d\t %d\t %d\t %d\n", + /* alloc */ alloc_count, toKB(obj_size * pm->alloc.level), toKB(obj_size * pm->alloc.hwater_level), (double) ((squid_curtime - pm->alloc.hwater_stamp) / 3600.), xpercentInt(obj_size * pm->alloc.level, TheMeter.alloc.level), - /* in use */ + /* in use */ inuse_count, toKB(obj_size * pm->inuse.level), toKB(obj_size * pm->inuse.hwater_level), xpercentInt(pm->inuse.level, pm->alloc.level), - /* idle */ + /* idle */ idle_count, - toKB(obj_size * pm->idle.level), toKB(obj_size * pm->idle.hwater_level), - /* (int)rint(xpercent(pm->idle.level, pm->alloc.level)), */ - /* saved */ + toKB(obj_size * pm->idle.level), + toKB(obj_size * pm->idle.hwater_level), + /* (int)rint(xpercent(pm->idle.level, pm->alloc.level)), */ + /* saved */ xpercentInt(pm->saved.count, mem_traffic_volume.count), - xpercentInt(obj_size * gb_to_double(&pm->saved), - gb_to_double(&mem_traffic_volume)), xpercentInt(pm->saved.count, - pm->total.count)); + xpercentInt(obj_size * gb_to_double(&pm->saved), gb_to_double(&mem_traffic_volume)), + xpercentInt(pm->saved.count, pm->total.count)); } /* MemMeter */ @@ -298,7 +294,8 @@ return pool->meter.inuse.level; } -size_t memPoolInUseSize(const MemPool * pool) +size_t +memPoolInUseSize(const MemPool * pool) { assert(pool); return pool->obj_size * pool->meter.inuse.level; @@ -314,7 +311,8 @@ toKB(memPoolInUseSize(pool))); } -size_t memTotalAllocated(void) +size_t +memTotalAllocated(void) { return TheMeter.alloc.level; } @@ -323,10 +321,11 @@ memPoolReport(const MemPool * pool, StoreEntry * e) { assert(pool); - storeAppendPrintf(e, "%-20s\t %4d\t ", pool->label, pool->obj_size); + storeAppendPrintf(e, "%-20s\t %4d\t ", + pool->label, pool->obj_size); memPoolMeterReport(&pool->meter, pool->obj_size, - pool->meter.alloc.level, pool->meter.inuse.level, - pool->meter.idle.level, e); + pool->meter.alloc.level, pool->meter.inuse.level, pool->meter.idle.level, + e); } void @@ -346,7 +345,9 @@ "(#)\t (KB)\t high (KB)\t high (hrs)\t impact (%%total)\t" "(#)\t (KB)\t high (KB)\t portion (%%alloc)\t" "(#)\t (KB)\t high (KB)\t" - "(%%number)\t (%%volume)\t" "(%%number)" "\n"); + "(%%number)\t (%%volume)\t" + "(%%number)" + "\n"); /* main table */ for (i = 0; i < Pools.count; i++) { const MemPool *pool = Pools.items[i]; @@ -357,14 +358,14 @@ idle_count += pool->meter.idle.level; } overhd_size += sizeof(MemPool) + sizeof(MemPool *) + - strlen(pool->label) + 1 + pool->pstack.capacity * sizeof(void *); + strlen(pool->label) + 1 + + pool->pstack.capacity * sizeof(void *); } overhd_size += sizeof(Pools) + Pools.capacity * sizeof(MemPool *); /* totals */ storeAppendPrintf(e, "%-20s\t %-4s\t ", "Total", "-"); memPoolMeterReport(&TheMeter, 1, alloc_count, inuse_count, idle_count, e); - storeAppendPrintf(e, "Cumulative allocated volume: %s\n", - gb_to_str(&mem_traffic_volume)); + storeAppendPrintf(e, "Cumulative allocated volume: %s\n", gb_to_str(&mem_traffic_volume)); /* overhead */ storeAppendPrintf(e, "Current overhead: %d bytes (%.3f%%)\n", overhd_size, xpercent(overhd_size, TheMeter.inuse.level)); Index: squid/src/Packer.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/Packer.c,v retrieving revision 1.1.1.2.4.1.2.1.2.1 retrieving revision 1.1.1.2.4.1.2.1.2.2 diff -u -r1.1.1.2.4.1.2.1.2.1 -r1.1.1.2.4.1.2.1.2.2 --- squid/src/Packer.c 27 Aug 2001 21:48:19 -0000 1.1.1.2.4.1.2.1.2.1 +++ squid/src/Packer.c 9 Sep 2001 12:02:44 -0000 1.1.1.2.4.1.2.1.2.2 @@ -1,5 +1,6 @@ + /* - * $Id: Packer.c,v 1.1.1.2.4.1.2.1.2.1 2001/08/27 21:48:19 tolsty Exp $ + * $Id: Packer.c,v 1.1.1.2.4.1.2.1.2.2 2001/09/09 12:02:44 serassio Exp $ * * DEBUG: section 60 Packer: A uniform interface to store-like modules * AUTHOR: Alex Rousskov @@ -91,16 +92,12 @@ */ /* append()'s */ -static void (*const store_append) (StoreEntry *, const char *, int) = - &storeAppend; -static void (*const memBuf_append) (MemBuf *, const char *, mb_size_t) = - &memBufAppend; +static void (*const store_append) (StoreEntry *, const char *, int) = &storeAppend; +static void (*const memBuf_append) (MemBuf *, const char *, mb_size_t) = &memBufAppend; /* vprintf()'s */ -static void (*const store_vprintf) (StoreEntry *, const char *, va_list ap) = - &storeAppendVPrintf; -static void (*const memBuf_vprintf) (MemBuf *, const char *, va_list ap) = - &memBufVPrintf; +static void (*const store_vprintf) (StoreEntry *, const char *, va_list ap) = &storeAppendVPrintf; +static void (*const memBuf_vprintf) (MemBuf *, const char *, va_list ap) = &memBufVPrintf; /* init/clean */ @@ -146,7 +143,7 @@ #if STDC_HEADERS void -packerPrintf(Packer * p, const char *fmt, ...) +packerPrintf(Packer * p, const char *fmt,...) { va_list args; va_start(args, fmt); Index: squid/src/mem.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/mem.c,v retrieving revision 1.1.1.3.4.1.2.1.2.1 retrieving revision 1.1.1.3.4.1.2.1.2.2 diff -u -r1.1.1.3.4.1.2.1.2.1 -r1.1.1.3.4.1.2.1.2.2 --- squid/src/mem.c 27 Aug 2001 21:48:21 -0000 1.1.1.3.4.1.2.1.2.1 +++ squid/src/mem.c 9 Sep 2001 12:02:44 -0000 1.1.1.3.4.1.2.1.2.2 @@ -1,5 +1,6 @@ + /* - * $Id: mem.c,v 1.1.1.3.4.1.2.1.2.1 2001/08/27 21:48:21 tolsty Exp $ + * $Id: mem.c,v 1.1.1.3.4.1.2.1.2.2 2001/09/09 12:02:44 serassio Exp $ * * DEBUG: section 13 High Level Memory Pool Management * AUTHOR: Harvest Derived @@ -40,28 +41,24 @@ /* string pools */ #define mem_str_pool_count 3 -static const struct -{ +static const struct { const char *name; size_t obj_size; -} -StrPoolsAttrs[mem_str_pool_count] = -{ +} StrPoolsAttrs[mem_str_pool_count] = { { - "Short Strings", 36,} - , /* to fit rfc1123 and similar */ + "Short Strings", 36, + }, /* to fit rfc1123 and similar */ { - "Medium Strings", 128,} - , /* to fit most urls */ + "Medium Strings", 128, + }, /* to fit most urls */ { - "Long Strings", 512} /* other */ + "Long Strings", 512 + } /* other */ }; -static struct -{ +static struct { MemPool *pool; -} -StrPools[mem_str_pool_count]; +} StrPools[mem_str_pool_count]; static MemMeter StrCountMeter; static MemMeter StrVolumeMeter; @@ -77,7 +74,8 @@ size_t pooled_volume = 0; /* heading */ storeAppendPrintf(sentry, - "String Pool\t Impact\t\t\n" " \t (%%strings)\t (%%volume)\n"); + "String Pool\t Impact\t\t\n" + " \t (%%strings)\t (%%volume)\n"); /* table body */ for (i = 0; i < mem_str_pool_count; i++) { const MemPool *pool = StrPools[i].pool; @@ -93,8 +91,7 @@ storeAppendPrintf(sentry, pfmt, "Other Strings", xpercentInt(StrCountMeter.level - pooled_count, StrCountMeter.level), - xpercentInt(StrVolumeMeter.level - pooled_volume, - StrVolumeMeter.level)); + xpercentInt(StrVolumeMeter.level - pooled_volume, StrVolumeMeter.level)); } static void @@ -219,8 +216,7 @@ sizeof(CommWriteStateData), 0); memDataInit(MEM_CONNSTATEDATA, "ConnStateData", sizeof(ConnStateData), 0); #if USE_CACHE_DIGESTS - memDataInit(MEM_DIGEST_FETCH_STATE, "DigestFetchState", - sizeof(DigestFetchState), 0); + memDataInit(MEM_DIGEST_FETCH_STATE, "DigestFetchState", sizeof(DigestFetchState), 0); #endif memDataInit(MEM_DISK_BUF, "Disk I/O Buffer", DISK_PAGE_SIZE, 200); memDataInit(MEM_DLINK_LIST, "dlink_list", sizeof(dlink_list), 10); @@ -235,7 +231,8 @@ memDataInit(MEM_FILEMAP, "fileMap", sizeof(fileMap), 0); memDataInit(MEM_FQDNCACHE_ENTRY, "fqdncache_entry", sizeof(fqdncache_entry), 0); - memDataInit(MEM_FQDNCACHE_PENDING, "fqdn_pending", sizeof(fqdn_pending), 0); + memDataInit(MEM_FQDNCACHE_PENDING, "fqdn_pending", + sizeof(fqdn_pending), 0); memDataInit(MEM_FWD_STATE, "FwdState", sizeof(FwdState), 0); memDataInit(MEM_FWD_SERVER, "FwdServer", sizeof(FwdServer), 0); memDataInit(MEM_HASH_LINK, "hash_link", sizeof(hash_link), 0); @@ -244,14 +241,11 @@ sizeof(HierarchyLogEntry), 0); memDataInit(MEM_HTTP_STATE_DATA, "HttpStateData", sizeof(HttpStateData), 0); memDataInit(MEM_HTTP_REPLY, "HttpReply", sizeof(HttpReply), 0); - memDataInit(MEM_HTTP_HDR_ENTRY, "HttpHeaderEntry", sizeof(HttpHeaderEntry), - 0); + memDataInit(MEM_HTTP_HDR_ENTRY, "HttpHeaderEntry", sizeof(HttpHeaderEntry), 0); memDataInit(MEM_HTTP_HDR_CC, "HttpHdrCc", sizeof(HttpHdrCc), 0); - memDataInit(MEM_HTTP_HDR_RANGE_SPEC, "HttpHdrRangeSpec", - sizeof(HttpHdrRangeSpec), 0); + memDataInit(MEM_HTTP_HDR_RANGE_SPEC, "HttpHdrRangeSpec", sizeof(HttpHdrRangeSpec), 0); memDataInit(MEM_HTTP_HDR_RANGE, "HttpHdrRange", sizeof(HttpHdrRange), 0); - memDataInit(MEM_HTTP_HDR_CONTENT_RANGE, "HttpHdrContRange", - sizeof(HttpHdrContRange), 0); + memDataInit(MEM_HTTP_HDR_CONTENT_RANGE, "HttpHdrContRange", sizeof(HttpHdrContRange), 0); memDataInit(MEM_ICPUDPDATA, "icpUdpData", sizeof(icpUdpData), 0); memDataInit(MEM_ICP_COMMON_T, "icp_common_t", sizeof(icp_common_t), 0); memDataInit(MEM_ICP_PING_DATA, "ping_data", sizeof(ping_data), 0); @@ -268,8 +262,7 @@ memDataInit(MEM_PEER, "peer", sizeof(peer), 0); #if USE_CACHE_DIGESTS memDataInit(MEM_PEER_DIGEST, "PeerDigest", sizeof(PeerDigest), 0); - memDataInit(MEM_DIGEST_FETCH_STATE, "DigestFetchState", - sizeof(DigestFetchState), 0); + memDataInit(MEM_DIGEST_FETCH_STATE, "DigestFetchState", sizeof(DigestFetchState), 0); #endif memDataInit(MEM_PINGERECHODATA, "pingerEchoData", sizeof(pingerEchoData), 0); @@ -295,14 +288,16 @@ memDataInit(MEM_HELPER, "helper", sizeof(helper), 0); memDataInit(MEM_HELPER_REQUEST, "helper_request", sizeof(helper_request), 0); - memDataInit(MEM_HELPER_SERVER, "helper_server", sizeof(helper_server), 0); + memDataInit(MEM_HELPER_SERVER, "helper_server", + sizeof(helper_server), 0); memDataInit(MEM_STORE_IO, "storeIOState", sizeof(storeIOState), 0); /* init string pools */ for (i = 0; i < mem_str_pool_count; i++) { - StrPools[i].pool = - memPoolCreate(StrPoolsAttrs[i].name, StrPoolsAttrs[i].obj_size); + StrPools[i].pool = memPoolCreate(StrPoolsAttrs[i].name, StrPoolsAttrs[i].obj_size); } - cachemgrRegister("mem", "Memory Utilization", memStats, 0, 1); + cachemgrRegister("mem", + "Memory Utilization", + memStats, 0, 1); } /* Index: squid/src/net_db.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/net_db.c,v retrieving revision 1.1.1.3.4.1.2.1.2.1 retrieving revision 1.1.1.3.4.1.2.1.2.2 diff -u -r1.1.1.3.4.1.2.1.2.1 -r1.1.1.3.4.1.2.1.2.2 --- squid/src/net_db.c 27 Aug 2001 21:48:21 -0000 1.1.1.3.4.1.2.1.2.1 +++ squid/src/net_db.c 9 Sep 2001 12:02:44 -0000 1.1.1.3.4.1.2.1.2.2 @@ -1,5 +1,6 @@ + /* - * $Id: net_db.c,v 1.1.1.3.4.1.2.1.2.1 2001/08/27 21:48:21 tolsty Exp $ + * $Id: net_db.c,v 1.1.1.3.4.1.2.1.2.2 2001/09/09 12:02:44 serassio Exp $ * * DEBUG: section 38 Network Measurement Database * AUTHOR: Duane Wessels @@ -36,8 +37,7 @@ #if USE_ICMP -typedef struct -{ +typedef struct { peer *p; StoreEntry *e; request_t *r; @@ -45,8 +45,7 @@ off_t used; size_t buf_sz; char *buf; -} -netdbExchangeState; +} netdbExchangeState; static hash_table *addr_table = NULL; static hash_table *host_table = NULL; @@ -184,7 +183,10 @@ *(list + list_count) = n; list_count++; } - qsort((char *) list, list_count, sizeof(netdbEntry *), netdbLRU); + qsort((char *) list, + list_count, + sizeof(netdbEntry *), + netdbLRU); for (k = 0; k < list_count; k++) { if (memInUse(MEM_NETDBENTRY) < Config.Netdb.low) break; @@ -244,8 +246,7 @@ hostname, n->network, na->network); x = (net_db_name *) hash_lookup(host_table, hostname); if (x == NULL) { - debug(38, 1) ("netdbSendPing: net_db_name list bug: %s not found", - hostname); + debug(38, 1) ("netdbSendPing: net_db_name list bug: %s not found", hostname); cbdataFree(hostname); return; } @@ -385,7 +386,10 @@ n->network, n->pings_sent, n->pings_recv, - n->hops, n->rtt, (int) n->next_ping_time, (int) n->last_use_time); + n->hops, + n->rtt, + (int) n->next_ping_time, + (int) n->last_use_time); for (x = n->hosts; x; x = x->next) fprintf(fp, " %s", x->name); fprintf(fp, "\n"); @@ -516,8 +520,7 @@ netdbExchangeDone(ex); return; } - debug(38, 3) ("netdbExchangeHandleReply: for '%s:%d'\n", ex->p->host, - ex->p->http_port); + debug(38, 3) ("netdbExchangeHandleReply: for '%s:%d'\n", ex->p->host, ex->p->http_port); p = buf; if (0 == ex->used) { /* skip reply headers */ @@ -567,8 +570,7 @@ hops = (double) ntohl(j) / 1000.0; break; default: - debug(38, - 1) ("netdbExchangeHandleReply: corrupt data, aborting\n"); + debug(38, 1) ("netdbExchangeHandleReply: corrupt data, aborting\n"); netdbExchangeDone(ex); return; } @@ -586,13 +588,9 @@ if (++nused == 20) break; } - debug(38, 3) - - - ("netdbExchangeHandleReply: used %d entries, (x %d bytes) == %d bytes total\n", + debug(38, 3) ("netdbExchangeHandleReply: used %d entries, (x %d bytes) == %d bytes total\n", nused, rec_sz, nused * rec_sz); - debug(38, 3) ("netdbExchangeHandleReply: seen %d, used %d\n", ex->seen, - ex->used); + debug(38, 3) ("netdbExchangeHandleReply: seen %d, used %d\n", ex->seen, ex->used); if (EBIT_TEST(ex->e->flags, ENTRY_ABORTED)) { debug(38, 3) ("netdbExchangeHandleReply: ENTRY_ABORTED\n"); netdbExchangeDone(ex); @@ -640,7 +638,9 @@ host_table = hash_create((HASHCMP *) strcmp, n, hash_string); eventAddIsh("netdbSaveState", netdbSaveState, NULL, 3600.0, 1); netdbReloadState(); - cachemgrRegister("netdb", "Network Measurement Database", netdbDump, 0, 1); + cachemgrRegister("netdb", + "Network Measurement Database", + netdbDump, 0, 1); #endif } @@ -677,7 +677,9 @@ n->hops = ((n->hops * (N - 1)) + hops) / N; n->rtt = ((n->rtt * (N - 1)) + rtt) / N; debug(38, 3) ("netdbHandlePingReply: %s; rtt=%5.1f hops=%4.1f\n", - n->network, n->rtt, n->hops); + n->network, + n->rtt, + n->hops); #endif } @@ -722,7 +724,11 @@ net_db_peer *p; storeAppendPrintf(sentry, "Network DB Statistics:\n"); storeAppendPrintf(sentry, "%-16.16s %9s %7s %5s %s\n", - "Network", "recv/sent", "RTT", "Hops", "Hostnames"); + "Network", + "recv/sent", + "RTT", + "Hops", + "Hostnames"); list = xcalloc(memInUse(MEM_NETDBENTRY), sizeof(netdbEntry *)); i = 0; hash_first(addr_table); @@ -731,18 +737,27 @@ if (i != memInUse(MEM_NETDBENTRY)) debug(38, 0) ("WARNING: netdb_addrs count off, found %d, expected %d\n", i, memInUse(MEM_NETDBENTRY)); - qsort((char *) list, i, sizeof(netdbEntry *), sortByRtt); + qsort((char *) list, + i, + sizeof(netdbEntry *), + sortByRtt); for (k = 0; k < i; k++) { n = *(list + k); storeAppendPrintf(sentry, "%-16.16s %4d/%4d %7.1f %5.1f", - n->network, n->pings_recv, n->pings_sent, n->rtt, n->hops); + n->network, + n->pings_recv, + n->pings_sent, + n->rtt, + n->hops); for (x = n->hosts; x; x = x->next) storeAppendPrintf(sentry, " %s", x->name); storeAppendPrintf(sentry, "\n"); p = n->peers; for (j = 0; j < n->n_peers; j++, p++) { storeAppendPrintf(sentry, " %-22.22s %7.1f %5.1f\n", - p->peername, p->rtt, p->hops); + p->peername, + p->rtt, + p->hops); } } xfree(list); @@ -813,8 +828,7 @@ double rtt = (double) irtt; double hops = (double) ihops; net_db_peer *p; - debug(38, 3) ("netdbUpdatePeer: '%s', %d hops, %d rtt\n", r->host, ihops, - irtt); + debug(38, 3) ("netdbUpdatePeer: '%s', %d hops, %d rtt\n", r->host, ihops, irtt); n = netdbLookupHost(r->host); if (n == NULL) { debug(38, 3) ("netdbUpdatePeer: host '%s' not found\n", r->host); @@ -827,7 +841,10 @@ p->expires = squid_curtime + 3600; if (n->n_peers < 2) return; - qsort((char *) n->peers, n->n_peers, sizeof(net_db_peer), sortPeerByRtt); + qsort((char *) n->peers, + n->n_peers, + sizeof(net_db_peer), + sortPeerByRtt); #endif } @@ -850,7 +867,10 @@ p->expires = squid_curtime + 3600; /* XXX ? */ if (n->n_peers < 2) return; - qsort((char *) n->peers, n->n_peers, sizeof(net_db_peer), sortPeerByRtt); + qsort((char *) n->peers, + n->n_peers, + sizeof(net_db_peer), + sortPeerByRtt); #endif } @@ -879,7 +899,8 @@ struct in_addr addr; storeBuffer(s); httpReplyReset(reply); - httpReplySetHeaders(reply, 1.0, HTTP_OK, "OK", NULL, -1, squid_curtime, -2); + httpReplySetHeaders(reply, 1.0, HTTP_OK, "OK", + NULL, -1, squid_curtime, -2); httpReplySwapOut(reply, s); rec_sz = 0; rec_sz += 1 + sizeof(addr.s_addr); @@ -937,9 +958,7 @@ cbdataAdd(ex, cbdataXfree, 0); cbdataLock(p); ex->p = p; - uri = - internalRemoteUri(p->host, p->http_port, "/squid-internal-dynamic/", - "netdb"); + uri = internalRemoteUri(p->host, p->http_port, "/squid-internal-dynamic/", "netdb"); debug(38, 3) ("netdbExchangeStart: Requesting '%s'\n", uri); assert(NULL != uri); ex->r = urlParse(METHOD_GET, uri);