From: Automatic source maintenance Date: Fri, 22 Oct 2010 00:12:11 +0000 (-0600) Subject: SourceFormat Enforcement X-Git-Tag: take1~159 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b3c9f64ab41fb78bbbe916979d8afc531e45b793;p=thirdparty%2Fsquid.git SourceFormat Enforcement --- diff --git a/scripts/calc-must-ids.pl b/scripts/calc-must-ids.pl old mode 100644 new mode 100755 diff --git a/scripts/calc-must-ids.sh b/scripts/calc-must-ids.sh old mode 100644 new mode 100755 diff --git a/src/Server.cc b/src/Server.cc index 065b79b59e..bb02d4c443 100644 --- a/src/Server.cc +++ b/src/Server.cc @@ -770,8 +770,7 @@ ServerStateData::handleAdaptationAborted(bool bypassable) err->xerrno = ERR_DETAIL_ICAP_RESPMOD_EARLY; fwd->fail(err); fwd->dontRetry(true); - } - else if (request) { // update logged info directly + } else if (request) { // update logged info directly request->detailError(ERR_ICAP_FAILURE, ERR_DETAIL_ICAP_RESPMOD_LATE); } diff --git a/src/adaptation/icap/ModXact.cc b/src/adaptation/icap/ModXact.cc index 48260bed79..d1c9f9d77f 100644 --- a/src/adaptation/icap/ModXact.cc +++ b/src/adaptation/icap/ModXact.cc @@ -1841,7 +1841,7 @@ bool Adaptation::Icap::ModXact::fillVirginHttpHeader(MemBuf &mb) const void Adaptation::Icap::ModXact::detailError(int errDetail) { if (HttpRequest *request = virgin.cause ? - virgin.cause : dynamic_cast(virgin.header)) { + virgin.cause : dynamic_cast(virgin.header)) { request->detailError(ERR_ICAP_FAILURE, errDetail); } } diff --git a/src/base/TextException.cc b/src/base/TextException.cc index 04c0ab3359..6ec66b7794 100644 --- a/src/base/TextException.cc +++ b/src/base/TextException.cc @@ -12,12 +12,12 @@ TextException::TextException() } TextException::TextException(const TextException& right) : - message((right.message?xstrdup(right.message):NULL)), theFileName(right.theFileName), theLineNo(right.theLineNo), theId(right.theId) + message((right.message?xstrdup(right.message):NULL)), theFileName(right.theFileName), theLineNo(right.theLineNo), theId(right.theId) { } TextException::TextException(const char *aMsg, const char *aFileName, int aLineNo, unsigned int anId): - message(xstrdup(aMsg)), theFileName(aFileName), theLineNo(aLineNo), theId(anId) + message(xstrdup(aMsg)), theFileName(aFileName), theLineNo(aLineNo), theId(anId) {} TextException::~TextException() throw() @@ -43,13 +43,13 @@ const char *TextException::what() const throw() } unsigned int TextException::FileNameHash(const char *fname) -{ +{ const char *s = NULL; unsigned int n = 0; unsigned int j = 0; unsigned int i = 0; s = strrchr(fname, '/'); - + if (s) s++; else diff --git a/src/base/TextException.h b/src/base/TextException.h index c69e472675..b02c03d548 100644 --- a/src/base/TextException.h +++ b/src/base/TextException.h @@ -22,7 +22,7 @@ public: // unique exception ID for transaction error detail logging unsigned int id() const { return theId; } - + virtual const char *what() const throw(); TextException& operator=(const TextException &right); @@ -38,7 +38,7 @@ protected: const char *theFileName; int theLineNo; unsigned int theId; - + friend unsigned int FileNameHashCached(const char *fname); }; @@ -62,7 +62,8 @@ FileNameHashCached(const char *fname) } /// Avoids "defined but not used" warnings for FileNameHashCached -class FileNameHashCacheUser { +class FileNameHashCacheUser +{ bool use(void *ptr=NULL) { return ptr != &FileNameHashCached;} }; diff --git a/src/err_detail_type.h b/src/err_detail_type.h index 7ebbbbf259..e683215c84 100644 --- a/src/err_detail_type.h +++ b/src/err_detail_type.h @@ -21,13 +21,14 @@ typedef enum { extern const char *err_detail_type_str[]; inline -const char *errorDetailName(int errDetailId) { +const char *errorDetailName(int errDetailId) +{ if (errDetailId < ERR_DETAIL_START) return "SYSERR"; if (errDetailId < ERR_DETAIL_MAX) return err_detail_type_str[errDetailId-ERR_DETAIL_START+2]; - + if (errDetailId >=ERR_DETAIL_EXCEPTION_START) return "EXCEPTION"; diff --git a/src/log/access_log.cc b/src/log/access_log.cc index 54d5d1ceda..8eb8982e44 100644 --- a/src/log/access_log.cc +++ b/src/log/access_log.cc @@ -385,8 +385,8 @@ typedef enum { LFT_HTTP_BODY_BYTES_READ, LFT_SQUID_STATUS, - LFT_SQUID_ERROR, - LFT_SQUID_ERROR_DETAIL, + LFT_SQUID_ERROR, + LFT_SQUID_ERROR_DETAIL, LFT_SQUID_HIERARCHY, LFT_MIME_TYPE, @@ -1136,7 +1136,7 @@ accessLogCustom(AccessLogEntry * al, customlog * log) case LFT_SQUID_ERROR_DETAIL: if (al->request && al->request->errDetail != ERR_DETAIL_NONE) { if (al->request->errDetail > ERR_DETAIL_START && - al->request->errDetail < ERR_DETAIL_MAX) + al->request->errDetail < ERR_DETAIL_MAX) out = errorDetailName(al->request->errDetail); else { if (al->request->errDetail >= ERR_DETAIL_EXCEPTION_START)