From: hno <> Date: Sat, 19 Oct 2002 04:42:00 +0000 (+0000) Subject: Indent (merged from SQUID2) X-Git-Tag: SQUID_3_0_PRE1~626 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db17c597d046aabd4987d46a5913e18e463501b3;p=thirdparty%2Fsquid.git Indent (merged from SQUID2) --- diff --git a/lib/MemPool.c b/lib/MemPool.c index daa6bf2254..a8f4ebcdcb 100644 --- a/lib/MemPool.c +++ b/lib/MemPool.c @@ -1,6 +1,6 @@ /* - * $Id: MemPool.c,v 1.12 2002/08/09 10:57:42 robertc Exp $ + * $Id: MemPool.c,v 1.13 2002/10/18 22:42:00 hno Exp $ * * DEBUG: section 63 Low Level Memory Pool Management * AUTHOR: Alex Rousskov, Andres Kroonmaa @@ -200,7 +200,7 @@ memCompObjChunks(void *obj, MemChunk * chunk) { if (obj < chunk->objCache) return -1; - if (obj < (void *)((char *)chunk->objCache + lastPool->chunk_size)) + if (obj < (void *) ((char *) chunk->objCache + lastPool->chunk_size)) return 0; return 1; } @@ -217,7 +217,7 @@ memPoolChunkNew(MemPool * pool) Free = chunk->freeList = chunk->objCache; for (i = 1; i < pool->chunk_capacity; i++) { - *Free = (void *) ((char *)Free + pool->obj_size); + *Free = (void *) ((char *) Free + pool->obj_size); Free = *Free; } chunk->nextFreeChunk = pool->nextFreeChunk; @@ -255,7 +255,7 @@ memPoolPush(MemPool * pool, void *obj) * not really need to be cleared.. There was a condition based on * the object size here, but such condition is not safe. */ - memset(obj, 0, pool->obj_size); + memset(obj, 0, pool->obj_size); Free = obj; *Free = pool->freeCache; pool->freeCache = obj; diff --git a/lib/radix.c b/lib/radix.c index 955d752933..110240a147 100644 --- a/lib/radix.c +++ b/lib/radix.c @@ -1,5 +1,5 @@ /* - * $Id: radix.c,v 1.17 2002/04/19 22:23:01 hno Exp $ + * $Id: radix.c,v 1.18 2002/10/18 22:42:00 hno Exp $ * * DEBUG: section 53 Radix tree data structure implementation * AUTHOR: NetBSD Derived @@ -128,7 +128,7 @@ static char *rn_zeros, *rn_ones; #define rn_l rn_u.rn_node.rn_L #define rn_r rn_u.rn_node.rn_R #define rm_mask rm_rmu.rmu_mask -#define rm_leaf rm_rmu.rmu_leaf /* extra field would make 32 bytes */ +#define rm_leaf rm_rmu.rmu_leaf /* extra field would make 32 bytes */ /* Helper macros */ @@ -259,7 +259,7 @@ squid_rn_lookup(void *v_arg, void *m_arg, struct squid_radix_node_head *head) } static int -rn_satsifies_leaf (char *trial, register struct squid_radix_node *leaf, int skip) +rn_satsifies_leaf(char *trial, register struct squid_radix_node *leaf, int skip) { register char *cp = trial, *cp2 = leaf->rn_key, *cp3 = leaf->rn_mask; char *cplim; @@ -914,7 +914,7 @@ squid_rn_delete(void *v_arg, void *netmask_arg, struct squid_radix_node_head *he } int -squid_rn_walktree(struct squid_radix_node_head *h, int (*f)(struct squid_radix_node *, void *), void *w) +squid_rn_walktree(struct squid_radix_node_head *h, int (*f) (struct squid_radix_node *, void *), void *w) { int error; struct squid_radix_node *base, *next; diff --git a/lib/rfc1035.c b/lib/rfc1035.c index 9aa6574d05..41800562a8 100644 --- a/lib/rfc1035.c +++ b/lib/rfc1035.c @@ -1,6 +1,6 @@ /* - * $Id: rfc1035.c,v 1.27 2002/09/15 06:40:54 robertc Exp $ + * $Id: rfc1035.c,v 1.28 2002/10/18 22:42:00 hno Exp $ * * Low level DNS protocol routines * AUTHOR: Duane Wessels @@ -312,7 +312,7 @@ rfc1035NameUnpack(const char *buf, size_t sz, off_t * off, char *name, size_t ns /* blasted compression */ unsigned short s; off_t ptr; - if (rdepth > 64) /* infinite pointer loop */ + if (rdepth > 64) /* infinite pointer loop */ return 1; memcpy(&s, buf + (*off), sizeof(s)); s = ntohs(s); diff --git a/lib/rfc2617.c b/lib/rfc2617.c index 15081b2cbc..5ae2730c0d 100644 --- a/lib/rfc2617.c +++ b/lib/rfc2617.c @@ -13,7 +13,7 @@ /* - * $Id: rfc2617.c,v 1.5 2001/10/17 13:30:50 hno Exp $ + * $Id: rfc2617.c,v 1.6 2002/10/18 22:42:00 hno Exp $ * * DEBUG: * AUTHOR: RFC 2617 & Robert Collins @@ -111,7 +111,7 @@ DigestCalcHA1( MD5Update(&Md5Ctx, pszRealm, strlen(pszRealm)); MD5Update(&Md5Ctx, ":", 1); MD5Update(&Md5Ctx, pszPassword, strlen(pszPassword)); - MD5Final((unsigned char *)HA1, &Md5Ctx); + MD5Final((unsigned char *) HA1, &Md5Ctx); } if (strcasecmp(pszAlg, "md5-sess") == 0) { MD5Init(&Md5Ctx); @@ -120,7 +120,7 @@ DigestCalcHA1( MD5Update(&Md5Ctx, pszNonce, strlen(pszNonce)); MD5Update(&Md5Ctx, ":", 1); MD5Update(&Md5Ctx, pszCNonce, strlen(pszCNonce)); - MD5Final((unsigned char *)HA1, &Md5Ctx); + MD5Final((unsigned char *) HA1, &Md5Ctx); } CvtHex(HA1, SessionKey); } @@ -154,7 +154,7 @@ DigestCalcResponse( MD5Update(&Md5Ctx, ":", 1); MD5Update(&Md5Ctx, HEntity, HASHHEXLEN); } - MD5Final((unsigned char *)HA2, &Md5Ctx); + MD5Final((unsigned char *) HA2, &Md5Ctx); CvtHex(HA2, HA2Hex); /* calculate response @@ -173,6 +173,6 @@ DigestCalcResponse( MD5Update(&Md5Ctx, ":", 1); } MD5Update(&Md5Ctx, HA2Hex, HASHHEXLEN); - MD5Final((unsigned char *)RespHash, &Md5Ctx); + MD5Final((unsigned char *) RespHash, &Md5Ctx); CvtHex(RespHash, Response); } diff --git a/lib/splay.c b/lib/splay.c index fd4a1abcfb..0d8e778e7c 100644 --- a/lib/splay.c +++ b/lib/splay.c @@ -1,5 +1,5 @@ /* - * $Id: splay.c,v 1.13 2002/04/06 08:49:26 adrian Exp $ + * $Id: splay.c,v 1.14 2002/10/18 22:42:00 hno Exp $ * * based on ftp://ftp.cs.cmu.edu/user/sleator/splaying/top-down-splay.c * http://bobo.link.cs.cmu.edu/cgi-bin/splay/splay-cgi.pl @@ -107,9 +107,9 @@ splay_delete(const void *data, splayNode * top, SPLAYCMP * compare) { splayNode *x; if (top == NULL) - return NULL; + return NULL; top = splay_splay(data, top, compare); - if (splayLastResult == 0) { /* found it */ + if (splayLastResult == 0) { /* found it */ if (top->left == NULL) { x = top->right; } else { @@ -119,7 +119,7 @@ splay_delete(const void *data, splayNode * top, SPLAYCMP * compare) xfree(top); return x; } - return top; /* It wasn't there */ + return top; /* It wasn't there */ } void diff --git a/lib/util.c b/lib/util.c index 86d043605b..06fc0a46d3 100644 --- a/lib/util.c +++ b/lib/util.c @@ -1,6 +1,6 @@ /* - * $Id: util.c,v 1.87 2002/10/02 11:06:30 robertc Exp $ + * $Id: util.c,v 1.88 2002/10/18 22:42:00 hno Exp $ * * DEBUG: * AUTHOR: Harvest Derived @@ -490,7 +490,7 @@ xfree(void *s) void xxfree(const void *s_const) { - void *s = (void *)s_const; + void *s = (void *) s_const; PROF_start(xxfree); #if XMALLOC_TRACE xmalloc_show_trace(s, -1); @@ -651,11 +651,11 @@ xstrerror(void) static char strerror_buf[BUFSIZ]; snprintf(strerror_buf, BUFSIZ, "%s", strerror(errno)); - - if (strerror_buf) + + if (strerror_buf) snprintf(xstrerror_buf, BUFSIZ, "(%d) %s", errno, strerror_buf); else - snprintf(xstrerror_buf, BUFSIZ, "(%d) Unknown", errno); + snprintf(xstrerror_buf, BUFSIZ, "(%d) Unknown", errno); return xstrerror_buf; } @@ -787,11 +787,11 @@ double_to_str(char *buf, int buf_size, double value) { /* select format */ if (value < 1e9) - snprintf(buf, buf_size, "%.2f MB", value / 1e6); + snprintf(buf, buf_size, "%.2f MB", value / 1e6); else if (value < 1e12) - snprintf(buf, buf_size, "%.3f GB", value / 1e9); + snprintf(buf, buf_size, "%.3f GB", value / 1e9); else - snprintf(buf, buf_size, "%.4f TB", value / 1e12); + snprintf(buf, buf_size, "%.4f TB", value / 1e12); return buf; }