From: wessels <> Date: Tue, 21 Jul 1998 23:26:11 +0000 (+0000) Subject: gindent X-Git-Tag: SQUID_3_0_PRE1~3024 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0cdcddb9a4993ebd713d348b5a22e372bde2f5d1;p=thirdparty%2Fsquid.git gindent --- diff --git a/src/ETag.cc b/src/ETag.cc index 8c6062988b..433b306fd5 100644 --- a/src/ETag.cc +++ b/src/ETag.cc @@ -1,6 +1,6 @@ /* - * $Id: ETag.cc,v 1.2 1998/07/20 17:19:00 wessels Exp $ + * $Id: ETag.cc,v 1.3 1998/07/21 17:26:11 wessels Exp $ * * DEBUG: section 7? HTTP ETag * AUTHOR: Alex Rousskov @@ -39,7 +39,7 @@ /* parses a string as weak or strong entity-tag; returns true on success */ /* note: we do not duplicate "str"! */ int -etagParseInit(ETag *etag, const char *str) +etagParseInit(ETag * etag, const char *str) { int len; assert(etag && str); @@ -49,16 +49,16 @@ etagParseInit(ETag *etag, const char *str) str += 2; /* check format (quoted-string) */ len = strlen(str); - if (len >= 2 && str[0] == '"' && str[len-1] == '"') + if (len >= 2 && str[0] == '"' && str[len - 1] == '"') etag->str = str; return etag->str != NULL; } /* returns true if etags are equal */ int -etagIsEqual(const ETag *tag1, const ETag *tag2) +etagIsEqual(const ETag * tag1, const ETag * tag2) { assert(tag1 && tag2); - assert(!tag1->weak && !tag2->weak); /* weak comparison not implemented yet */ + assert(!tag1->weak && !tag2->weak); /* weak comparison not implemented yet */ return !strcmp(tag1->str, tag2->str); } diff --git a/src/HttpBody.cc b/src/HttpBody.cc index a88f16dabd..6e6d971dff 100644 --- a/src/HttpBody.cc +++ b/src/HttpBody.cc @@ -2,7 +2,7 @@ /* - * $Id: HttpBody.cc,v 1.13 1998/07/20 17:19:01 wessels Exp $ + * $Id: HttpBody.cc,v 1.14 1998/07/21 17:26:12 wessels Exp $ * * DEBUG: section 56 HTTP Message Body * AUTHOR: Alex Rousskov @@ -50,11 +50,11 @@ httpBodyClean(HttpBody * body) /* set body by absorbing mb */ void -httpBodySet(HttpBody * body, MemBuf *mb) +httpBodySet(HttpBody * body, MemBuf * mb) { assert(body); assert(memBufIsNull(&body->mb)); - body->mb = *mb; /* absorb */ + body->mb = *mb; /* absorb */ } void diff --git a/src/HttpHdrCc.cc b/src/HttpHdrCc.cc index 19e4f69b43..1d8ee801ef 100644 --- a/src/HttpHdrCc.cc +++ b/src/HttpHdrCc.cc @@ -1,6 +1,6 @@ /* - * $Id: HttpHdrCc.cc,v 1.13 1998/07/20 17:19:02 wessels Exp $ + * $Id: HttpHdrCc.cc,v 1.14 1998/07/21 17:26:13 wessels Exp $ * * DEBUG: section 65 HTTP Cache Control Header * AUTHOR: Alex Rousskov @@ -205,7 +205,7 @@ httpHdrCcUpdateStats(const HttpHdrCc * cc, StatHist * hist) void httpHdrCcStatDumper(StoreEntry * sentry, int idx, double val, double size, int count) { - extern const HttpHeaderStat *dump_stat; /* argh! */ + extern const HttpHeaderStat *dump_stat; /* argh! */ const int id = (int) val; const int valid_id = id >= 0 && id < CC_ENUM_END; const char *name = valid_id ? strBuf(CcFieldsInfo[id].name) : "INVALID"; diff --git a/src/HttpHdrContRange.cc b/src/HttpHdrContRange.cc index 98e45c52b2..707b2b78b0 100644 --- a/src/HttpHdrContRange.cc +++ b/src/HttpHdrContRange.cc @@ -1,6 +1,6 @@ /* - * $Id: HttpHdrContRange.cc,v 1.6 1998/07/20 17:19:02 wessels Exp $ + * $Id: HttpHdrContRange.cc,v 1.7 1998/07/21 17:26:14 wessels Exp $ * * DEBUG: section 68 HTTP Content-Range Header * AUTHOR: Alex Rousskov @@ -183,7 +183,7 @@ httpHdrContRangePackInto(const HttpHdrContRange * range, Packer * p) } void -httpHdrContRangeSet(HttpHdrContRange *cr, HttpHdrRangeSpec spec, size_t ent_len) +httpHdrContRangeSet(HttpHdrContRange * cr, HttpHdrRangeSpec spec, size_t ent_len) { assert(cr && ent_len >= 0); cr->spec = spec; diff --git a/src/HttpHdrRange.cc b/src/HttpHdrRange.cc index f61f268cc9..bda126f122 100644 --- a/src/HttpHdrRange.cc +++ b/src/HttpHdrRange.cc @@ -1,6 +1,6 @@ /* - * $Id: HttpHdrRange.cc,v 1.11 1998/07/20 17:19:04 wessels Exp $ + * $Id: HttpHdrRange.cc,v 1.12 1998/07/21 17:26:14 wessels Exp $ * * DEBUG: section 64 HTTP Range Header * AUTHOR: Alex Rousskov @@ -148,7 +148,7 @@ static int httpHdrRangeSpecCanonize(HttpHdrRangeSpec * spec, size_t clen) { debug(64, 5) ("httpHdrRangeSpecCanonize: have: [%d, %d) len: %d\n", - spec->offset, spec->offset+spec->length, spec->length); + spec->offset, spec->offset + spec->length, spec->length); if (!known_spec(spec->offset)) /* suffix */ spec->offset = size_diff(clen, spec->length); else if (!known_spec(spec->length)) /* trailer */ @@ -159,7 +159,7 @@ httpHdrRangeSpecCanonize(HttpHdrRangeSpec * spec, size_t clen) spec->length = size_min(size_diff(clen, spec->offset), spec->length); /* check range validity */ debug(64, 5) ("httpHdrRangeSpecCanonize: done: [%d, %d) len: %d\n", - spec->offset, spec->offset+spec->length, spec->length); + spec->offset, spec->offset + spec->length, spec->length); return spec->length > 0; } @@ -169,20 +169,20 @@ static int httpHdrRangeSpecMergeWith(HttpHdrRangeSpec * recep, const HttpHdrRangeSpec * donor) { int merged = 0; - size_t rhs = recep->offset + recep->length; /* no -1 ! */ - const size_t donor_rhs = donor->offset + donor->length; /* no -1 ! */ + size_t rhs = recep->offset + recep->length; /* no -1 ! */ + const size_t donor_rhs = donor->offset + donor->length; /* no -1 ! */ assert(known_spec(recep->offset)); assert(known_spec(donor->offset)); assert(recep->length > 0); assert(donor->length > 0); /* do we have a left hand side overlap? */ if (donor->offset < recep->offset && recep->offset <= donor_rhs) { - recep->offset = donor->offset; /* decrease left offset */ + recep->offset = donor->offset; /* decrease left offset */ merged = 1; } /* do we have a right hand side overlap? */ if (donor->offset <= rhs && rhs < donor_rhs) { - rhs = donor_rhs; /* increase right offset */ + rhs = donor_rhs; /* increase right offset */ merged = 1; } /* adjust length if offsets have been changed */ @@ -330,13 +330,13 @@ httpHdrRangeCanonize(HttpHdrRange * range, size_t clen) /* merged with current so get rid of the prev one */ assert(prev_spec == stackPop(&range->specs)); httpHdrRangeSpecDestroy(prev_spec); - continue; /* re-iterate */ + continue; /* re-iterate */ } } stackPush(&range->specs, spec); - i++; /* progress */ + i++; /* progress */ } - debug(64, 3) ("httpHdrRangeCanonize: merged %d specs\n", + debug(64, 3) ("httpHdrRangeCanonize: merged %d specs\n", goods.count - range->specs.count); stackClean(&goods); debug(64, 3) ("httpHdrRangeCanonize: finished with %d specs\n", @@ -346,7 +346,7 @@ httpHdrRangeCanonize(HttpHdrRange * range, size_t clen) /* searches for next range, returns true if found */ HttpHdrRangeSpec * -httpHdrRangeGetSpec(const HttpHdrRange * range, HttpHdrRangePos *pos) +httpHdrRangeGetSpec(const HttpHdrRange * range, HttpHdrRangePos * pos) { assert(range); assert(pos && *pos >= -1 && *pos < range->specs.count); diff --git a/src/HttpHeader.cc b/src/HttpHeader.cc index 26087ef9ef..45a50d240c 100644 --- a/src/HttpHeader.cc +++ b/src/HttpHeader.cc @@ -1,6 +1,6 @@ /* - * $Id: HttpHeader.cc,v 1.50 1998/07/20 20:20:50 wessels Exp $ + * $Id: HttpHeader.cc,v 1.51 1998/07/21 17:26:15 wessels Exp $ * * DEBUG: section 55 HTTP Header * AUTHOR: Alex Rousskov @@ -172,7 +172,7 @@ static http_hdr_type ReplyHeadersArr[] = HDR_MIME_VERSION, HDR_PUBLIC, HDR_RETRY_AFTER, HDR_SERVER, HDR_SET_COOKIE, HDR_VARY, HDR_WARNING, HDR_PROXY_CONNECTION, HDR_X_CACHE, - HDR_X_CACHE_LOOKUP, + HDR_X_CACHE_LOOKUP, HDR_X_REQUEST_URI, HDR_X_SQUID_ERROR }; @@ -324,7 +324,7 @@ httpHeaderAppend(HttpHeader * dest, const HttpHeader * src) /* use fresh entries to replace old ones */ void -httpHeaderUpdate(HttpHeader * old, const HttpHeader * fresh, const HttpHeaderMask *denied_mask) +httpHeaderUpdate(HttpHeader * old, const HttpHeader * fresh, const HttpHeaderMask * denied_mask) { const HttpHeaderEntry *e; HttpHeaderPos pos = HttpHeaderInitPos; @@ -493,7 +493,7 @@ httpHeaderDelById(HttpHeader * hdr, http_hdr_type id) debug(55, 8) ("%p del-by-id %d\n", hdr, id); assert(hdr); assert_eid(id); - assert_eid(id != HDR_OTHER); /* does not make sense */ + assert_eid(id != HDR_OTHER); /* does not make sense */ if (!CBIT_TEST(hdr->mask, id)) return 0; while ((e = httpHeaderGetEntry(hdr, &pos))) { @@ -639,7 +639,7 @@ httpHeaderPutCc(HttpHeader * hdr, const HttpHdrCc * cc) } void -httpHeaderPutContRange(HttpHeader * hdr, const HttpHdrContRange *cr) +httpHeaderPutContRange(HttpHeader * hdr, const HttpHdrContRange * cr) { MemBuf mb; Packer p; @@ -658,7 +658,7 @@ httpHeaderPutContRange(HttpHeader * hdr, const HttpHdrContRange *cr) } void -httpHeaderPutRange(HttpHeader * hdr, const HttpHdrRange *range) +httpHeaderPutRange(HttpHeader * hdr, const HttpHdrRange * range) { MemBuf mb; Packer p; @@ -808,9 +808,10 @@ httpHeaderGetAuth(const HttpHeader * hdr, http_hdr_type id, const char *authSche ETag httpHeaderGetETag(const HttpHeader * hdr, http_hdr_type id) { - ETag etag = { NULL, -1 }; + ETag etag = + {NULL, -1}; HttpHeaderEntry *e; - assert(Headers[id].type == ftETag); /* must be of an appropriate type */ + assert(Headers[id].type == ftETag); /* must be of an appropriate type */ if ((e = httpHeaderFindEntry(hdr, id))) etagParseInit(&etag, strBuf(e->value)); return etag; @@ -821,7 +822,7 @@ httpHeaderGetTimeOrTag(const HttpHeader * hdr, http_hdr_type id) { TimeOrTag tot; HttpHeaderEntry *e; - assert(Headers[id].type == ftDate_1123_or_ETag); /* must be of an appropriate type */ + assert(Headers[id].type == ftDate_1123_or_ETag); /* must be of an appropriate type */ memset(&tot, 0, sizeof(tot)); if ((e = httpHeaderFindEntry(hdr, id))) { const char *str = strBuf(e->value); @@ -836,7 +837,7 @@ httpHeaderGetTimeOrTag(const HttpHeader * hdr, http_hdr_type id) tot.tag.str = NULL; } } - assert(tot.time < 0 || !tot.tag.str); /* paranoid */ + assert(tot.time < 0 || !tot.tag.str); /* paranoid */ return tot; } @@ -951,7 +952,7 @@ httpHeaderNoteParsedEntry(http_hdr_type id, String context, int error) */ /* tmp variable used to pass stat info to dumpers */ -extern const HttpHeaderStat *dump_stat; /* argh! */ +extern const HttpHeaderStat *dump_stat; /* argh! */ const HttpHeaderStat *dump_stat = NULL; static void diff --git a/src/HttpRequest.cc b/src/HttpRequest.cc index 56484b9567..c131ddce39 100644 --- a/src/HttpRequest.cc +++ b/src/HttpRequest.cc @@ -1,6 +1,6 @@ /* - * $Id: HttpRequest.cc,v 1.12 1998/07/20 19:26:49 wessels Exp $ + * $Id: HttpRequest.cc,v 1.13 1998/07/21 17:26:16 wessels Exp $ * * DEBUG: section 73 HTTP Request * AUTHOR: Duane Wessels @@ -105,7 +105,7 @@ httpRequestSwapOut(const request_t * req, StoreEntry * e) /* packs request-line and headers, appends terminator */ void -httpRequestPack(const request_t * req, Packer *p) +httpRequestPack(const request_t * req, Packer * p) { assert(req && p); /* pack request-line */ diff --git a/src/MemBuf.cc b/src/MemBuf.cc index e77db481e1..6f5a91e821 100644 --- a/src/MemBuf.cc +++ b/src/MemBuf.cc @@ -1,5 +1,5 @@ /* - * $Id: MemBuf.cc,v 1.16 1998/07/20 17:19:10 wessels Exp $ + * $Id: MemBuf.cc,v 1.17 1998/07/21 17:26:17 wessels Exp $ * * DEBUG: section 59 auto-growing Memory Buffer with printf * AUTHOR: Alex Rousskov @@ -171,8 +171,8 @@ memBufIsNull(MemBuf * mb) { assert(mb); if (!mb->buf && !mb->max_capacity && !mb->capacity && !mb->size) - return 1; /* null, not initialized */ - assert(mb->buf && mb->max_capacity && mb->capacity); /* paranoid */ + return 1; /* null, not initialized */ + assert(mb->buf && mb->max_capacity && mb->capacity); /* paranoid */ return 0; } diff --git a/src/asn.cc b/src/asn.cc index 90ee2ad1a9..e9fdef87f2 100644 --- a/src/asn.cc +++ b/src/asn.cc @@ -1,5 +1,5 @@ /* - * $Id: asn.cc,v 1.43 1998/07/20 22:40:46 wessels Exp $ + * $Id: asn.cc,v 1.44 1998/07/21 17:26:20 wessels Exp $ * * DEBUG: section 53 AS Number handling * AUTHOR: Duane Wessels, Kostas Anagnostakis @@ -35,7 +35,7 @@ /* BEGIN of definitions for radix tree entries */ /* int in memory with length */ -typedef u_char m_int[1 + sizeof(unsigned int)]; +typedef u_char m_int[1 + sizeof(unsigned int)]; #define store_m_int(i, m) \ (i = htonl(i), m[0] = sizeof(m_int), xmemcpy(m+1, &i, sizeof(unsigned int))) #define get_m_int(i, m) \ diff --git a/src/cache_cf.cc b/src/cache_cf.cc index fe538e35dc..d4a9effa24 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -1,6 +1,6 @@ /* - * $Id: cache_cf.cc,v 1.290 1998/07/20 20:20:52 wessels Exp $ + * $Id: cache_cf.cc,v 1.291 1998/07/21 17:26:21 wessels Exp $ * * DEBUG: section 3 Configuration File Parsing * AUTHOR: Harvest Derived @@ -465,7 +465,7 @@ dump_acl_access(StoreEntry * entry, const char *name, acl_access * head) acl_list *l; while (head != NULL) { storeAppendPrintf(entry, "%s %s", - name, + name, head->allow ? "Allow" : "Deny"); for (l = head->acl_list; l != NULL; l = l->next) { storeAppendPrintf(entry, " %s%s", @@ -671,7 +671,7 @@ free_cachedir(cacheSwap * swap) const char * peer_type_str(const peer_t type) { - switch(type) { + switch (type) { case PEER_PARENT: return "parent"; break; @@ -786,9 +786,9 @@ parse_peer(peer ** head) #if USE_CARP } else if (!strncasecmp(token, "carp-load-factor=", 17)) { if (p->type != PEER_PARENT) - debug(3,0)("parse_peer: Ignoring carp-load-factor for non-parent %s/%d\n", p->host, p->http_port); - else - p->carp.load_factor = atof(token + 17); + debug(3, 0) ("parse_peer: Ignoring carp-load-factor for non-parent %s/%d\n", p->host, p->http_port); + else + p->carp.load_factor = atof(token + 17); #endif } else { debug(3, 0) ("parse_peer: token='%s'\n", token); @@ -801,12 +801,12 @@ parse_peer(peer ** head) p->tcp_up = PEER_TCP_MAGIC_COUNT; #if USE_CARP if (p->carp.load_factor) { - /* - * calculate this peers hash for use in CARP - */ - p->carp.hash = 0; - for (token = p->host; *token != 0;token++) - p->carp.hash += (p->carp.hash << 19) + *token; + /* + * calculate this peers hash for use in CARP + */ + p->carp.hash = 0; + for (token = p->host; *token != 0; token++) + p->carp.hash += (p->carp.hash << 19) + *token; } #endif cbdataAdd(p, MEM_NONE); @@ -913,11 +913,11 @@ parse_peer_access(void) peer *p; if (!(host = strtok(NULL, w_space))) self_destruct(); - if ((p = peerFindByName(host)) == NULL) { - debug(15, 0) ("%s, line %d: No cache_peer '%s'\n", - cfg_filename, config_lineno, host); - return; - } + if ((p = peerFindByName(host)) == NULL) { + debug(15, 0) ("%s, line %d: No cache_peer '%s'\n", + cfg_filename, config_lineno, host); + return; + } aclParseAccessLine(&p->access); } diff --git a/src/cache_manager.cc b/src/cache_manager.cc index 53741f19a0..63b008133a 100644 --- a/src/cache_manager.cc +++ b/src/cache_manager.cc @@ -1,6 +1,6 @@ /* - * $Id: cache_manager.cc,v 1.15 1998/07/20 20:20:53 wessels Exp $ + * $Id: cache_manager.cc,v 1.16 1998/07/21 17:26:23 wessels Exp $ * * DEBUG: section 16 Cache Manager Objects * AUTHOR: Duane Wessels @@ -45,8 +45,8 @@ typedef struct _action_table { char *desc; OBJH *handler; struct { - int pw_req:1; - int atomic:1; + int pw_req:1; + int atomic:1; } flags; struct _action_table *next; } action_table; @@ -238,7 +238,7 @@ cachemgrStart(int fd, request_t * request, StoreEntry * entry) a = cachemgrFindAction(mgr->action); assert(a != NULL); if (a->flags.atomic) - storeBuffer(entry); + storeBuffer(entry); { HttpReply *rep = entry->mem_obj->reply; /* prove there are no previous reply headers around */ @@ -255,8 +255,8 @@ cachemgrStart(int fd, request_t * request, StoreEntry * entry) } a->handler(entry); if (a->flags.atomic) { - storeBufferFlush(entry); - storeComplete(entry); + storeBufferFlush(entry); + storeComplete(entry); } cachemgrStateFree(mgr); } diff --git a/src/carp.cc b/src/carp.cc index b9a55deffc..4157636dff 100644 --- a/src/carp.cc +++ b/src/carp.cc @@ -1,5 +1,5 @@ /* - * $Id: carp.cc,v 1.2 1998/07/20 17:19:24 wessels Exp $ + * $Id: carp.cc,v 1.3 1998/07/21 17:26:23 wessels Exp $ * * DEBUG: section 44 Cache Array Routing Protocol * AUTHOR: Eric Stern @@ -26,7 +26,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. * - */ + */ #include "squid.h" @@ -47,7 +47,7 @@ carpInit(void) a += p->carp.load_factor; K++; } - if (a == 0.0) + if (a == 0.0) /* CARP load factors not configured */ return; /* @@ -88,21 +88,21 @@ carpSelectParent(request_t * request) /* select peer */ for (tp = Config.peers; tp; tp = tp->next) { if (p->carp.load_factor == 0.0) - continue; + continue; assert(p->type == PEER_PARENT); combined_hash = (url_hash ^ tp->carp.hash); combined_hash += combined_hash * 0x62531965; combined_hash = combined_hash << 21; combined_hash = combined_hash * tp->carp.load_multiplier; debug(44, 3) ("carpSelectParent: %s combined_hash %d\n", - tp->host, combined_hash); + tp->host, combined_hash); if ((combined_hash > high_score) && neighborUp(tp)) { p = tp; high_score = combined_hash; } } if (p) - debug(44, 3) ("carpSelectParent: selected CARP %s\n", p->host); + debug(44, 3) ("carpSelectParent: selected CARP %s\n", p->host); return p; } #endif diff --git a/src/client.cc b/src/client.cc index 61eecf6343..ae09c6b66b 100644 --- a/src/client.cc +++ b/src/client.cc @@ -1,8 +1,6 @@ - - /* - * $Id: client.cc,v 1.72 1998/07/20 17:19:26 wessels Exp $ + * $Id: client.cc,v 1.73 1998/07/21 17:26:24 wessels Exp $ * * DEBUG: section 0 WWW Client * AUTHOR: Harvest Derived diff --git a/src/client_side.cc b/src/client_side.cc index 7d70c28192..77bfe924f7 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -1,6 +1,6 @@ /* - * $Id: client_side.cc,v 1.361 1998/07/21 17:22:02 wessels Exp $ + * $Id: client_side.cc,v 1.362 1998/07/21 17:26:26 wessels Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -409,7 +409,7 @@ modifiedSince(StoreEntry * entry, request_t * request) debug(33, 3) ("modifiedSince: '%s'\n", storeUrl(entry)); if (mod_time < 0) mod_time = entry->timestamp; - debug(33,3)("modifiedSince: mod_time = %d\n", (int) mod_time); + debug(33, 3) ("modifiedSince: mod_time = %d\n", (int) mod_time); if (mod_time < 0) return 1; /* Find size of the object */ @@ -786,7 +786,7 @@ clientCheckContentLength(request_t * r) { /* We only require a content-length for "upload" methods */ if (!pumpMethod(r->method)) - return 1; + return 1; if (httpHeaderGetInt(&r->header, HDR_CONTENT_LENGTH) < 0) return 0; return 1; @@ -1165,8 +1165,8 @@ clientCacheHit(void *data, char *buf, ssize_t size) /* * We hold a stale copy; it needs to be validated */ - if (e->lastmod < 0) { - /* + if (e->lastmod < 0) { + /* * Previous reply didn't have a Last-Modified header, * we cannot revalidate it. */ diff --git a/src/enums.h b/src/enums.h index 4c20a44652..894ae8c8af 100644 --- a/src/enums.h +++ b/src/enums.h @@ -480,7 +480,7 @@ enum { REQ_REFRESH, REQ_USED_PROXY_AUTH, REQ_REDIRECTED, - REQ_NOCACHE_HACK /* for changing no-cache requests into IMS */ + REQ_NOCACHE_HACK /* for changing no-cache requests into IMS */ }; enum { diff --git a/src/forward.cc b/src/forward.cc index 4929a9209e..d9236bc498 100644 --- a/src/forward.cc +++ b/src/forward.cc @@ -1,6 +1,6 @@ /* - * $Id: forward.cc,v 1.18 1998/07/20 17:19:39 wessels Exp $ + * $Id: forward.cc,v 1.19 1998/07/21 17:26:28 wessels Exp $ * * DEBUG: section 17 Request Forwarding * AUTHOR: Duane Wessels @@ -319,24 +319,24 @@ fwdStart(int fd, StoreEntry * e, request_t * r, struct in_addr peer_addr) /* * Check if this host is allowed to fetch MISSES from us (miss_access) */ - memset(&ch, '\0', sizeof(aclCheck_t)); + memset(&ch, '\0', sizeof(aclCheck_t)); ch.src_addr = peer_addr; ch.request = r; answer = aclCheckFast(Config.accessList.miss, &ch); if (answer == 0) { - err = errorCon(ERR_FORWARDING_DENIED, HTTP_FORBIDDEN); - err->request = requestLink(r); - err->src_addr = peer_addr; - errorAppendEntry(e, err); - return; + err = errorCon(ERR_FORWARDING_DENIED, HTTP_FORBIDDEN); + err->request = requestLink(r); + err->src_addr = peer_addr; + errorAppendEntry(e, err); + return; } debug(17, 3) ("fwdStart: '%s'\n", storeUrl(e)); e->mem_obj->request = requestLink(r); e->mem_obj->fd = fd; switch (r->protocol) { - /* - * Note, don't create fwdState for these requests - */ + /* + * Note, don't create fwdState for these requests + */ case PROTO_INTERNAL: internalStart(r, e); return; diff --git a/src/ftp.cc b/src/ftp.cc index a48b4c3c9d..93289da0d3 100644 --- a/src/ftp.cc +++ b/src/ftp.cc @@ -1,6 +1,6 @@ /* - * $Id: ftp.cc,v 1.239 1998/07/20 22:50:37 wessels Exp $ + * $Id: ftp.cc,v 1.240 1998/07/21 17:26:29 wessels Exp $ * * DEBUG: section 9 File Transfer Protocol (FTP) * AUTHOR: Harvest Derived @@ -575,7 +575,7 @@ ftpHtmlifyListEntry(char *line, FtpStateData * ftpState) LOCAL_ARRAY(char, html, 8192); size_t width = Config.Ftp.list_width; ftpListParts *parts; - *icon=*href=*text=*size=*chdir=*view=*download=*link=*html='\0'; + *icon = *href = *text = *size = *chdir = *view = *download = *link = *html = '\0'; if ((int) strlen(line) > 1024) { snprintf(html, 8192, "%s\n", line); return html; @@ -610,7 +610,7 @@ ftpHtmlifyListEntry(char *line, FtpStateData * ftpState) strcpy(text, "Home Directory"); } snprintf(html, 8192, "%s %s %s\n", - href, icon, href, text, link); + href, icon, href, text, link); return html; } if ((parts = ftpListParseParts(line, ftpState->flags)) == NULL) { @@ -636,7 +636,7 @@ ftpHtmlifyListEntry(char *line, FtpStateData * ftpState) } } /* {icon} {text} . . . {date}{size}{chdir}{view}{download}{link}\n */ - xstrncpy(href,rfc1738_escape(parts->name),2048); + xstrncpy(href, rfc1738_escape(parts->name), 2048); xstrncpy(text, parts->showname, 2048); switch (parts->type) { case 'd': @@ -660,7 +660,7 @@ ftpHtmlifyListEntry(char *line, FtpStateData * ftpState) mimeGetIconURL(parts->name), "[UNKNOWN]"); snprintf(chdir, 2048, " ", + "ALT=\"[DIR]\">", rfc1738_escape(parts->name), mimeGetIconURL("internal-dir")); break; @@ -675,25 +675,25 @@ ftpHtmlifyListEntry(char *line, FtpStateData * ftpState) if (parts->type != 'd') { if (mimeGetViewOption(parts->name)) { snprintf(view, 2048, " ", + "ALT=\"[VIEW]\">", href, mimeGetIconURL("internal-view")); } if (mimeGetDownloadOption(parts->name)) { snprintf(download, 2048, " ", + "ALT=\"[DOWNLOAD]\">", href, mimeGetIconURL("internal-download")); } } /* {icon} {text} . . . {date}{size}{chdir}{view}{download}{link}\n */ if (parts->type != '\0') { snprintf(html, 8192, "%s %s%s " - "%s%8s%s%s%s%s\n", + "%s%8s%s%s%s%s\n", href, icon, href, text, dots_fill(strlen(text)), parts->date, size, chdir, view, download, link); } else { /* Plain listing. {icon} {text} ... {chdir}{view}{download} */ snprintf(html, 8192, "%s %s%s " - "%s%s%s%s\n", + "%s%s%s%s\n", href, icon, href, text, dots_fill(strlen(text)), chdir, view, download, link); } @@ -2079,10 +2079,10 @@ ftpFail(FtpStateData * ftpState) ErrorState *err; debug(9, 3) ("ftpFail\n"); /* Try the / hack to support "Netscape" FTP URL's for retreiving files */ - if (!ftpState->flags.isdir && /* Not a directory */ - !ftpState->flags.try_slash_hack && /* Not in slash hack */ + if (!ftpState->flags.isdir && /* Not a directory */ + !ftpState->flags.try_slash_hack && /* Not in slash hack */ ftpState->mdtm <= 0 && ftpState->size < 0 && /* Not known as a file */ - !strNCaseCmp(ftpState->request->urlpath, "/%2f", 4)) { /* No slash encoded */ + !strNCaseCmp(ftpState->request->urlpath, "/%2f", 4)) { /* No slash encoded */ switch (ftpState->state) { case SENT_CWD: case SENT_RETR: diff --git a/src/globals.h b/src/globals.h index 896571633e..f9150708f6 100644 --- a/src/globals.h +++ b/src/globals.h @@ -1,6 +1,6 @@ /* - * $Id: globals.h,v 1.60 1998/07/14 22:56:00 wessels Exp $ + * $Id: globals.h,v 1.61 1998/07/21 17:26:30 wessels Exp $ */ extern FILE *debug_log; /* NULL */ @@ -105,5 +105,5 @@ extern CacheDigest *store_digest; /* NULL */ extern const char *StoreDigestUrlPath; /* "store_digest" */ extern const char *StoreDigestMimeStr; /* "application/cache-digest" */ extern const Version CacheDigestVer; /* { 3, 3 } */ -extern const char *MultipartMsgBoundaryStr; /* "Unique-Squid-Separator" */ -extern icpUdpData *IcpQueueHead; /* NULL */ +extern const char *MultipartMsgBoundaryStr; /* "Unique-Squid-Separator" */ +extern icpUdpData *IcpQueueHead; /* NULL */ diff --git a/src/htcp.cc b/src/htcp.cc index 7f3ea37977..014099f22b 100644 --- a/src/htcp.cc +++ b/src/htcp.cc @@ -184,15 +184,15 @@ htcpBuildSpecifier(char *buf, size_t buflen, htcpStuff * stuff) ssize_t htcpBuildTstOpData(char *buf, size_t buflen, htcpStuff * stuff) { - switch(stuff->rr) { + switch (stuff->rr) { case RR_REQUEST: - return htcpBuildSpecifier(buf, buflen, stuff); + return htcpBuildSpecifier(buf, buflen, stuff); case RR_RESPONSE: - return htcpBuildDetail(buf, buflen, stuff); + return htcpBuildDetail(buf, buflen, stuff); default: fatal_dump("htcpBuildTstOpData: bad RR value"); - } - return 0; + } + return 0; } ssize_t @@ -286,8 +286,8 @@ htcpQuery(StoreEntry * e, request_t * req, peer * p) ssize_t pktlen; char vbuf[32]; htcpStuff stuff; - HttpHeader hdr; - Packer pa; + HttpHeader hdr; + Packer pa; MemBuf mb; snprintf(vbuf, sizeof(vbuf), "%3.1f", req->http_ver); stuff.op = HTCP_TST; @@ -297,12 +297,12 @@ htcpQuery(StoreEntry * e, request_t * req, peer * p) stuff.method = RequestMethodStr[req->method]; stuff.uri = storeUrl(e); stuff.version = vbuf; - httpBuildRequestHeader(req, req, e, &hdr, -1, 0); - memBufDefInit(&mb); - packerToMemInit(&pa, &mb); - httpHeaderPackInto(&hdr, &pa); - httpHeaderClean(&hdr); - packerClean(&pa); + httpBuildRequestHeader(req, req, e, &hdr, -1, 0); + memBufDefInit(&mb); + packerToMemInit(&pa, &mb); + httpHeaderPackInto(&hdr, &pa); + httpHeaderClean(&hdr); + packerClean(&pa); stuff.req_hdrs = mb.buf; pkt = htcpBuildPacket(&stuff, &pktlen); if (pkt == NULL) { @@ -400,13 +400,13 @@ htcpUnpackSpecifier(char *buf, int sz) } static void -htcpHandleNop(char *buf, int sz, peer *p) +htcpHandleNop(char *buf, int sz, peer * p) { debug(31, 1) ("htcpHandleNop: Unimplemented\n"); } static void -htcpHandleTst(char *buf, int sz, peer *p) +htcpHandleTst(char *buf, int sz, peer * p) { /* buf should be a SPECIFIER */ htcpSpecifier *s = htcpUnpackSpecifier(buf, sz); @@ -440,7 +440,7 @@ htcpHandleTst(char *buf, int sz, peer *p) } static void -htcpTstReply(StoreEntry *e, htcpSpecifier *spec, peer *p) +htcpTstReply(StoreEntry * e, htcpSpecifier * spec, peer * p) { htcpStuff stuff; char *pkt; @@ -462,19 +462,19 @@ htcpTstReply(StoreEntry *e, htcpSpecifier *spec, peer *p) } static void -htcpHandleMon(char *buf, int sz, peer *p) +htcpHandleMon(char *buf, int sz, peer * p) { debug(31, 1) ("htcpHandleMon: Unimplemented\n"); } static void -htcpHandleSet(char *buf, int sz, peer *p) +htcpHandleSet(char *buf, int sz, peer * p) { debug(31, 1) ("htcpHandleSet: Unimplemented\n"); } static void -htcpHandleData(char *buf, int sz, peer *p) +htcpHandleData(char *buf, int sz, peer * p) { htcpDataHeader hdr; if (sz < sizeof(htcpDataHeader)) { @@ -528,8 +528,8 @@ htcpHandle(char *buf, int sz, struct sockaddr_in *from) peer *p; p = whichPeer(from); if (NULL == p) { - debug(31,1)("htcpHandle: HTCP message from non-peer: %s:%d\n", - inet_ntoa(from->sin_addr), (int) ntohs(from->sin_port)); + debug(31, 1) ("htcpHandle: HTCP message from non-peer: %s:%d\n", + inet_ntoa(from->sin_addr), (int) ntohs(from->sin_port)); return; } if (sz < sizeof(htcpHeader)) { diff --git a/src/http.cc b/src/http.cc index cdbb123c2e..b78982dbaf 100644 --- a/src/http.cc +++ b/src/http.cc @@ -1,6 +1,6 @@ /* - * $Id: http.cc,v 1.297 1998/07/20 19:25:34 wessels Exp $ + * $Id: http.cc,v 1.298 1998/07/21 17:26:33 wessels Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -272,12 +272,12 @@ httpCachableReply(HttpStateData * httpState) /* NOTREACHED */ break; /* Some responses can never be cached */ - case HTTP_PARTIAL_CONTENT: /* Not yet supported */ + case HTTP_PARTIAL_CONTENT: /* Not yet supported */ case HTTP_SEE_OTHER: case HTTP_NOT_MODIFIED: case HTTP_UNAUTHORIZED: case HTTP_PROXY_AUTHENTICATION_REQUIRED: - case HTTP_INVALID_HEADER: /* Squid header parsing error */ + case HTTP_INVALID_HEADER: /* Squid header parsing error */ default: /* Unknown status code */ return 0; /* NOTREACHED */ @@ -348,9 +348,9 @@ httpProcessReplyHeader(HttpStateData * httpState, const char *buf, int size) } if (reply->cache_control) { if (EBIT_TEST(reply->cache_control->mask, CC_PROXY_REVALIDATE)) - EBIT_SET(entry->flag, ENTRY_REVALIDATE); + EBIT_SET(entry->flag, ENTRY_REVALIDATE); else if (EBIT_TEST(reply->cache_control->mask, CC_MUST_REVALIDATE)) - EBIT_SET(entry->flag, ENTRY_REVALIDATE); + EBIT_SET(entry->flag, ENTRY_REVALIDATE); } if (EBIT_TEST(httpState->flags, HTTP_KEEPALIVE)) if (httpState->peer) diff --git a/src/internal.cc b/src/internal.cc index 53da11af44..c72dd35ca3 100644 --- a/src/internal.cc +++ b/src/internal.cc @@ -16,7 +16,7 @@ internalStart(request_t * request, StoreEntry * entry) netdbBinaryExchange(entry); else { debug(0, 0) ("internalStart: unknown request '%s'\n", upath); - debugObj(0,0, "internalStart: unknown request:\n", request, (ObjPackMethod)&httpRequestPack); + debugObj(0, 0, "internalStart: unknown request:\n", request, (ObjPackMethod) & httpRequestPack); err = errorCon(ERR_INVALID_REQ, HTTP_NOT_FOUND); err->request = requestLink(request); errorAppendEntry(entry, err); diff --git a/src/mime.cc b/src/mime.cc index 014b9e502b..0912dffa3a 100644 --- a/src/mime.cc +++ b/src/mime.cc @@ -1,6 +1,6 @@ /* - * $Id: mime.cc,v 1.71 1998/07/20 22:50:38 wessels Exp $ + * $Id: mime.cc,v 1.72 1998/07/21 17:26:35 wessels Exp $ * * DEBUG: section 25 MIME Parsing * AUTHOR: Harvest Derived @@ -115,7 +115,7 @@ typedef struct _mime_entry { char *content_type; char *content_encoding; char transfer_mode; - unsigned int view_option:1,download_option:1; + unsigned int view_option:1, download_option:1; struct _mime_entry *next; } mimeEntry; @@ -295,7 +295,7 @@ mimeGetEntry(const char *fn, int skip_encodings) mimeEntry *m; char *t; char *name = xstrdup(fn); -try_again: + try_again: for (m = MimeTable; m; m = m->next) { if (regexec(&m->compiled_pattern, name, 0, 0, 0) == 0) break; @@ -307,7 +307,7 @@ try_again: goto try_again; } /* What? A encoding without a extension? */ - m=NULL; + m = NULL; } xfree(name); return m; @@ -432,14 +432,14 @@ mimeInit(char *filename) debug(25, 1) ("mimeInit: parse error: '%s'\n", buf); continue; } - download_option=0; - view_option=0; + download_option = 0; + view_option = 0; while ((option = strtok(NULL, w_space)) != NULL) { - if (!strcmp(option,"+download")) + if (!strcmp(option, "+download")) download_option = 1; - else if (!strcmp(option,"+view")) + else if (!strcmp(option, "+view")) view_option = 1; - else + else debug(25, 1) ("mimeInit: unknown option: '%s' (%s)\n", buf, option); } if (regcomp(&re, pattern, re_flags) != 0) { diff --git a/src/neighbors.cc b/src/neighbors.cc index 8423a23f62..ee77490bca 100644 --- a/src/neighbors.cc +++ b/src/neighbors.cc @@ -1,6 +1,6 @@ /* - * $Id: neighbors.cc,v 1.227 1998/07/20 20:21:04 wessels Exp $ + * $Id: neighbors.cc,v 1.228 1998/07/21 17:26:36 wessels Exp $ * * DEBUG: section 15 Neighbor Routines * AUTHOR: Harvest Derived @@ -148,7 +148,7 @@ neighborTypeStr(const peer * p) peer * -whichPeer(const struct sockaddr_in *from) +whichPeer(const struct sockaddr_in * from) { int j; u_short port = ntohs(from->sin_port); diff --git a/src/peer_select.cc b/src/peer_select.cc index d503b8b529..c4ada5570a 100644 --- a/src/peer_select.cc +++ b/src/peer_select.cc @@ -1,6 +1,6 @@ /* - * $Id: peer_select.cc,v 1.71 1998/07/20 17:19:59 wessels Exp $ + * $Id: peer_select.cc,v 1.72 1998/07/21 17:26:38 wessels Exp $ * * DEBUG: section 44 Peer Selection Algorithm * AUTHOR: Duane Wessels @@ -87,8 +87,8 @@ peerSelectStateFree(ps_state * psstate) requestUnlink(psstate->request); psstate->request = NULL; if (psstate->entry) { - storeUnlockObject(psstate->entry); - psstate->entry = NULL; + storeUnlockObject(psstate->entry); + psstate->entry = NULL; } cbdataFree(psstate); } @@ -158,7 +158,7 @@ peerSelect(request_t * request, request->hier.peer_select_start = current_time; #endif if (psstate->entry) - storeLockObject(psstate->entry); + storeLockObject(psstate->entry); cbdataLock(callback_data); peerSelectFoo(psstate); } @@ -305,9 +305,9 @@ peerSelectFoo(ps_state * psstate) #endif #if USE_CARP } else if ((p = carpSelectParent(request))) { - hierarchyNote(&request->hier, CARP, &psstate->icp, p->host); - peerSelectCallback(psstate, p); - return; + hierarchyNote(&request->hier, CARP, &psstate->icp, p->host); + peerSelectCallback(psstate, p); + return; #endif } else if ((p = netdbClosestParent(request))) { request->hier.alg = PEER_SA_NETDB; @@ -386,7 +386,7 @@ peerPingTimeout(void *data) if (!cbdataValid(psstate->callback_data)) { /* request aborted */ cbdataUnlock(psstate->callback_data); - peerSelectStateFree(psstate); + peerSelectStateFree(psstate); return; } if (entry) diff --git a/src/protos.h b/src/protos.h index edd1fb8dc5..d995e20646 100644 --- a/src/protos.h +++ b/src/protos.h @@ -247,8 +247,8 @@ extern int httpAnonHdrDenied(http_hdr_type hdr_id); extern void httpBuildRequestHeader(request_t *, request_t *, StoreEntry *, HttpHeader *, int, int); /* ETag */ -extern int etagParseInit(ETag *etag, const char *str); -extern int etagIsEqual(const ETag *tag1, const ETag *tag2); +extern int etagParseInit(ETag * etag, const char *str); +extern int etagIsEqual(const ETag * tag1, const ETag * tag2); /* Http Status Line */ /* init/clean */ @@ -273,7 +273,7 @@ extern void httpBodyClean(HttpBody * body); /* get body ptr (always use this) */ extern const char *httpBodyPtr(const HttpBody * body); /* set body, does not clone mb so you should not reuse it */ -extern void httpBodySet(HttpBody * body, MemBuf *mb); +extern void httpBodySet(HttpBody * body, MemBuf * mb); /* pack */ extern void httpBodyPackInto(const HttpBody * body, Packer * p); @@ -360,8 +360,8 @@ extern void httpHeaderPutTime(HttpHeader * hdr, http_hdr_type type, time_t time) extern void httpHeaderPutStr(HttpHeader * hdr, http_hdr_type type, const char *str); extern void httpHeaderPutAuth(HttpHeader * hdr, const char *authScheme, const char *realm); extern void httpHeaderPutCc(HttpHeader * hdr, const HttpHdrCc * cc); -extern void httpHeaderPutContRange(HttpHeader * hdr, const HttpHdrContRange *cr); -extern void httpHeaderPutRange(HttpHeader * hdr, const HttpHdrRange *range); +extern void httpHeaderPutContRange(HttpHeader * hdr, const HttpHdrContRange * cr); +extern void httpHeaderPutRange(HttpHeader * hdr, const HttpHdrRange * range); extern void httpHeaderPutExt(HttpHeader * hdr, const char *name, const char *value); extern int httpHeaderGetInt(const HttpHeader * hdr, http_hdr_type id); extern time_t httpHeaderGetTime(const HttpHeader * hdr, http_hdr_type id); @@ -430,7 +430,7 @@ extern request_t *requestLink(request_t *); extern void requestUnlink(request_t *); extern int httpRequestParseHeader(request_t * req, const char *parse_start); extern void httpRequestSwapOut(const request_t * req, StoreEntry * e); -extern void httpRequestPack(const request_t * req, Packer *p); +extern void httpRequestPack(const request_t * req, Packer * p); extern int httpRequestPrefixLen(const request_t * req); extern int httpRequestHdrAllowed(const HttpHeaderEntry * e, String * strConnection); @@ -1019,7 +1019,7 @@ extern char *internalRemoteUri(const char *, u_short, const char *, const char * #if USE_CARP extern void carpInit(void); -extern peer * carpSelectParent(request_t *); +extern peer *carpSelectParent(request_t *); #endif /* packs, then prints an object using debug() */ diff --git a/src/refresh.cc b/src/refresh.cc index 329421b92b..d9950c67ca 100644 --- a/src/refresh.cc +++ b/src/refresh.cc @@ -1,6 +1,6 @@ /* - * $Id: refresh.cc,v 1.26 1998/07/21 03:16:07 wessels Exp $ + * $Id: refresh.cc,v 1.27 1998/07/21 17:26:40 wessels Exp $ * * DEBUG: section 22 Refresh Calculation * AUTHOR: Harvest Derived @@ -58,7 +58,7 @@ struct { #define REFRESH_DEFAULT_PCT 0.20 #define REFRESH_DEFAULT_MAX (time_t)259200 -static const refresh_t * refreshLimits(const char *); +static const refresh_t *refreshLimits(const char *); static const refresh_t *refreshUncompiledPattern(const char *); static OBJH refreshStats; diff --git a/src/snmp_agent.cc b/src/snmp_agent.cc index 896adb4069..4b83d81b6a 100644 --- a/src/snmp_agent.cc +++ b/src/snmp_agent.cc @@ -1,6 +1,6 @@ /* - * $Id: snmp_agent.cc,v 1.47 1998/07/20 22:40:47 wessels Exp $ + * $Id: snmp_agent.cc,v 1.48 1998/07/21 17:26:41 wessels Exp $ * * DEBUG: section 49 SNMP Interface * AUTHOR: Kostas Anagnostakis @@ -63,10 +63,10 @@ snmp_basicFn(variable_list * Var, snint * ErrP) switch (Var->name[7]) { case SYS_DESCR: pp = SQUID_SYS_DESCR; - Answer->type = ASN_OCTET_STR; - Answer->val_len = strlen(pp); - Answer->val.string = (u_char *) xstrdup(pp); - break; + Answer->type = ASN_OCTET_STR; + Answer->val_len = strlen(pp); + Answer->val.string = (u_char *) xstrdup(pp); + break; case SYS_OBJECT_ID: pp = SQUID_VERSION; Answer->type = ASN_OCTET_STR; diff --git a/src/store_client.cc b/src/store_client.cc index 12d98ef4ca..94f22d5e3e 100644 --- a/src/store_client.cc +++ b/src/store_client.cc @@ -245,7 +245,7 @@ storeClientFileRead(store_client * sc) sc); else { if (sc->entry->swap_status == SWAPOUT_WRITING) - assert(mem->swapout.done_offset > sc->copy_offset + mem->swap_hdr_sz); + assert(mem->swapout.done_offset > sc->copy_offset + mem->swap_hdr_sz); file_read(sc->swapin_fd, sc->copy_buf, sc->copy_size, diff --git a/src/structs.h b/src/structs.h index 88aff8adc5..35e090ea3a 100644 --- a/src/structs.h +++ b/src/structs.h @@ -1,7 +1,4 @@ - - - struct _acl_ip_data { struct in_addr addr1; /* if addr2 non-zero then its a range */ struct in_addr addr2; @@ -1386,8 +1383,8 @@ struct _FwdState { FwdServer *servers; int server_fd; struct { - int err_code; - http_status http_code; + int err_code; + http_status http_code; int xerrno; } fail; time_t start; diff --git a/src/tools.cc b/src/tools.cc index 6e7bc9258f..8a192a6539 100644 --- a/src/tools.cc +++ b/src/tools.cc @@ -1,6 +1,6 @@ /* - * $Id: tools.cc,v 1.162 1998/07/20 17:20:18 wessels Exp $ + * $Id: tools.cc,v 1.163 1998/07/21 17:26:46 wessels Exp $ * * DEBUG: section 21 Misc Functions * AUTHOR: Harvest Derived @@ -904,7 +904,7 @@ debugObj(int section, int level, const char *label, void *obj, ObjPackMethod pm) assert(label && obj && pm); memBufDefInit(&mb); packerToMemInit(&p, &mb); - (*pm)(obj, &p); + (*pm) (obj, &p); debug(section, level) ("%s%s", label, mb.buf); packerClean(&p); memBufClean(&mb); diff --git a/src/typedefs.h b/src/typedefs.h index 80ca44d48c..2a33b2ead5 100644 --- a/src/typedefs.h +++ b/src/typedefs.h @@ -192,4 +192,4 @@ typedef ssize_t HttpHeaderPos; typedef char HttpHeaderMask[8]; /* a common objPackInto interface; used by debugObj */ -typedef void (*ObjPackMethod)(void *obj, Packer *p); +typedef void (*ObjPackMethod) (void *obj, Packer * p); diff --git a/src/whois.cc b/src/whois.cc index f86597f773..33a7292032 100644 --- a/src/whois.cc +++ b/src/whois.cc @@ -1,5 +1,5 @@ /* - * $Id: whois.cc,v 1.3 1998/07/20 17:20:24 wessels Exp $ + * $Id: whois.cc,v 1.4 1998/07/21 17:26:48 wessels Exp $ * * DEBUG: section 75 WHOIS protocol * AUTHOR: Duane Wessels, Kostas Anagnostakis @@ -56,7 +56,7 @@ whoisStart(FwdState * fwdState, int fd) cbdataAdd(p, MEM_NONE); storeLockObject(p->entry); comm_add_close_handler(fd, whoisClose, p); - l = strLen(p->request->urlpath)+3; + l = strLen(p->request->urlpath) + 3; buf = xmalloc(l); snprintf(buf, l, "%s\r\n", strBuf(p->request->urlpath) + 1); comm_write(fd, buf, strlen(buf), NULL, p, xfree);