diff --git a/mozilla/netwerk/cache/src/nsDiskCacheBindData.h b/mozilla/netwerk/cache/src/nsDiskCacheBindData.h index cb6c6c11085..ca6f114e2ef 100644 --- a/mozilla/netwerk/cache/src/nsDiskCacheBindData.h +++ b/mozilla/netwerk/cache/src/nsDiskCacheBindData.h @@ -179,4 +179,4 @@ private: PRBool initialized; }; -#endif /* _nsDiskCacheBindData_h_ */ \ No newline at end of file +#endif /* _nsDiskCacheBindData_h_ */ diff --git a/mozilla/netwerk/cache/src/nsDiskCacheBlockFile.h b/mozilla/netwerk/cache/src/nsDiskCacheBlockFile.h index 868f7443b2f..93aea56ce41 100644 --- a/mozilla/netwerk/cache/src/nsDiskCacheBlockFile.h +++ b/mozilla/netwerk/cache/src/nsDiskCacheBlockFile.h @@ -65,11 +65,11 @@ public: nsresult WriteBlocks( char * buffer, PRInt32 startBlock, PRInt32 numBlocks); nsresult ReadBlocks( char * buffer, PRInt32 startBlock, PRInt32 numBlocks); -// private: - virtual nsresult FlushBitMap(); - virtual nsresult ValidateFile(); // called by Open() - virtual nsresult VerifyAllocation( PRInt32 startBlock, PRInt32 numBLocks); - virtual PRInt32 LastBlock(); +private: + nsresult FlushBitMap(); + nsresult ValidateFile(); // called by Open() + nsresult VerifyAllocation( PRInt32 startBlock, PRInt32 numBLocks); + PRInt32 LastBlock(); /** * Data members diff --git a/mozilla/netwerk/cache/src/nsDiskCacheEntry.h b/mozilla/netwerk/cache/src/nsDiskCacheEntry.h index f96da442225..d80f4ee739b 100644 --- a/mozilla/netwerk/cache/src/nsDiskCacheEntry.h +++ b/mozilla/netwerk/cache/src/nsDiskCacheEntry.h @@ -77,7 +77,7 @@ struct nsDiskCacheEntry { void Unswap() // network to host (disk to memory) { #if defined(IS_LITTLE_ENDIAN) - mHeaderVersion = ::PR_ntohl(mHeaderSize); + mHeaderVersion = ::PR_ntohl(mHeaderVersion); mMetaLocation = ::PR_ntohl(mMetaLocation); mFetchCount = ::PR_ntohl(mFetchCount); mLastFetched = ::PR_ntohl(mLastFetched); diff --git a/mozilla/netwerk/cache/src/nsDiskCacheMap.cpp b/mozilla/netwerk/cache/src/nsDiskCacheMap.cpp index 8ab8d6ed026..a36629cd15e 100644 --- a/mozilla/netwerk/cache/src/nsDiskCacheMap.cpp +++ b/mozilla/netwerk/cache/src/nsDiskCacheMap.cpp @@ -349,7 +349,7 @@ nsDiskCacheMap::DeleteRecord( nsDiskCacheRecord * mapRecord) if (NS_FAILED(rv)) return rv; PRUint32 count = bucket->CountRecords(); - for (int i = 0; i < count; ++i) { + for (PRUint32 i = 0; i < count; ++i) { if (bucket->mRecords[i].HashNumber() == mapRecord->HashNumber()) { // found it, now delete it. if (i != (count - 1)) { // if not the last record, shift last record into opening @@ -419,8 +419,6 @@ nsDiskCacheMap::ReadDiskCacheEntry(nsDiskCacheRecord * record, nsDiskCacheEntry { nsresult rv; nsDiskCacheEntry * diskEntry = nsnull; - PRUint16 generation = record->Generation(); - PRUint32 hashNumber = record->HashNumber(); PRUint32 metaFile = record->MetaFile(); PRFileDesc * fd = nsnull; *result = nsnull; diff --git a/mozilla/netwerk/cache/src/nsDiskCacheMap.h b/mozilla/netwerk/cache/src/nsDiskCacheMap.h index 82fe28f01e9..070c7269740 100644 --- a/mozilla/netwerk/cache/src/nsDiskCacheMap.h +++ b/mozilla/netwerk/cache/src/nsDiskCacheMap.h @@ -25,6 +25,8 @@ #ifndef _nsDiskCacheMap_h_ #define _nsDiskCacheMap_h_ +#include + #include "prtypes.h" #include "prnetdb.h" #include "nsDebug.h" @@ -218,7 +220,7 @@ public: if (DataFile() == 0) return DataGeneration(); else if (MetaFile() == 0) return MetaGeneration(); - return -1; // no generation + return SHRT_MAX; // no generation } @@ -228,7 +230,7 @@ public: #if defined(IS_LITTLE_ENDIAN) mHashNumber = ::PR_htonl(mHashNumber); mEvictionRank = ::PR_htonl(mEvictionRank); - mLocation = ::PR_htonl(mLocation); + mDataLocation = ::PR_htonl(mDataLocation); mMetaLocation = ::PR_htonl(mMetaLocation); #endif } @@ -238,7 +240,7 @@ public: #if defined(IS_LITTLE_ENDIAN) mHashNumber = ::PR_ntohl(mHashNumber); mEvictionRank = ::PR_ntohl(mEvictionRank); - mLocation = ::PR_ntohl(mLocation); + mDataLocation = ::PR_ntohl(mDataLocation); mMetaLocation = ::PR_ntohl(mMetaLocation); #endif }