From d178daf7fa5cfdb8c6471d34e138a3287511203c Mon Sep 17 00:00:00 2001 From: Automatic source maintenance Date: Tue, 10 Apr 2012 18:15:57 -0600 Subject: [PATCH] SourceFormat Enforcement --- src/StoreSwapLogData.cc | 4 ++-- src/StoreSwapLogData.h | 7 ++++--- src/fs/ufs/ufscommon.cc | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/StoreSwapLogData.cc b/src/StoreSwapLogData.cc index 5adb2ad9ea..4fe40598a6 100644 --- a/src/StoreSwapLogData.cc +++ b/src/StoreSwapLogData.cc @@ -46,7 +46,7 @@ SwapChecksum24::set(uint32_t f1, uint32_t f2, uint32_t f3) sum += f3; while (const uint64_t higherBits = sum >> 24) - sum = (sum & 0xFFFFFF) + higherBits; + sum = (sum & 0xFFFFFF) + higherBits; sum = ~sum; @@ -103,7 +103,7 @@ StoreSwapLogData::finalize() } StoreSwapLogHeader::StoreSwapLogHeader(): op(SWAP_LOG_VERSION), version(2), - record_size(sizeof(StoreSwapLogData)) + record_size(sizeof(StoreSwapLogData)) { checksum.set(version, record_size, 0); } diff --git a/src/StoreSwapLogData.h b/src/StoreSwapLogData.h index fbcae3eca0..de112be705 100644 --- a/src/StoreSwapLogData.h +++ b/src/StoreSwapLogData.h @@ -62,15 +62,16 @@ #include "squid-old.h" /// maintains a 24-bit checksum over integer fields -class SwapChecksum24 { +class SwapChecksum24 +{ public: SwapChecksum24() { raw[0] = raw[1] = raw[2] = 0; } - bool operator ==(const SwapChecksum24 &o) const { + bool operator ==(const SwapChecksum24 &o) const { return raw[0] == o.raw[0] && raw[1] == o.raw[1] && raw[2] == o.raw[2]; } - bool operator !=(const SwapChecksum24 &o) const { + bool operator !=(const SwapChecksum24 &o) const { return !(*this == o); } diff --git a/src/fs/ufs/ufscommon.cc b/src/fs/ufs/ufscommon.cc index 827918091c..266715e7f5 100644 --- a/src/fs/ufs/ufscommon.cc +++ b/src/fs/ufs/ufscommon.cc @@ -366,7 +366,7 @@ RebuildState::RebuildState (RefCount aSwapDir) : sd (aSwapDir),LogPa flags.need_to_validate = 1; debugs(47, DBG_IMPORTANT, "Rebuilding storage in " << sd->path << " (" << - (clean ? "clean log" : (LogParser ? "dirty log" : "no log")) << ")"); + (clean ? "clean log" : (LogParser ? "dirty log" : "no log")) << ")"); } RebuildState::~RebuildState() -- 2.47.2