bug 398568: Fix prbool misuse in netwerk. r=biesi a=dsicore

This commit is contained in:
tglek%mozilla.com 2008-02-21 23:18:50 +00:00
Родитель 516c1a8654
Коммит 060c62ce9f
6 изменённых файлов: 12 добавлений и 12 удалений

4
netwerk/cache/src/nsCacheRequest.h поставляемый
Просмотреть файл

@ -118,10 +118,10 @@ private:
void MarkDoomEntriesIfExpired() { mInfo |= eDoomEntriesIfExpiredMask; }
PRBool WillDoomEntriesIfExpired() { return (mInfo & eDoomEntriesIfExpiredMask); }
PRBool WillDoomEntriesIfExpired() { return (0 != (mInfo & eDoomEntriesIfExpiredMask)); }
void MarkBlockingMode() { mInfo |= eBlockingModeMask; }
PRBool IsBlocking() { return (mInfo & eBlockingModeMask); }
PRBool IsBlocking() { return (0 != (mInfo & eBlockingModeMask)); }
PRBool IsNonBlocking() { return !(mInfo & eBlockingModeMask); }
void SetStoragePolicy(nsCacheStoragePolicy policy)

2
netwerk/cache/src/nsCacheSession.h поставляемый
Просмотреть файл

@ -74,7 +74,7 @@ public:
void MarkDoomEntriesIfExpired() { mInfo |= eDoomEntriesIfExpiredMask; }
void ClearDoomEntriesIfExpired() { mInfo &= ~eDoomEntriesIfExpiredMask; }
PRBool WillDoomEntriesIfExpired() { return (mInfo & eDoomEntriesIfExpiredMask); }
PRBool WillDoomEntriesIfExpired() { return (0 != (mInfo & eDoomEntriesIfExpiredMask)); }
nsCacheStoragePolicy StoragePolicy()
{

4
netwerk/cache/src/nsDiskCacheMap.h поставляемый
Просмотреть файл

@ -144,7 +144,7 @@ public:
void SetEvictionRank( PRUint32 rank) { mEvictionRank = rank ? rank : 1; }
// DataLocation accessors
PRBool DataLocationInitialized() const { return mDataLocation & eLocationInitializedMask; }
PRBool DataLocationInitialized() const { return 0 != (mDataLocation & eLocationInitializedMask); }
void ClearDataLocation() { mDataLocation = 0; }
PRUint32 DataFile() const
@ -211,7 +211,7 @@ public:
}
// MetaLocation accessors
PRBool MetaLocationInitialized() const { return mMetaLocation & eLocationInitializedMask; }
PRBool MetaLocationInitialized() const { return 0 != (mMetaLocation & eLocationInitializedMask); }
void ClearMetaLocation() { mMetaLocation = 0; }
PRUint32 MetaLocation() const { return mMetaLocation; }

Просмотреть файл

@ -922,8 +922,8 @@ nsCookieService::Read()
PRInt64 expiry = stmt->AsInt64(5);
PRInt64 lastAccessed = stmt->AsInt64(6);
PRBool isSecure = stmt->AsInt32(7);
PRBool isHttpOnly = stmt->AsInt32(8);
PRBool isSecure = 0 != stmt->AsInt32(7);
PRBool isHttpOnly = 0 != stmt->AsInt32(8);
// create a new nsCookie and assign the data.
nsCookie* newCookie =

Просмотреть файл

@ -2548,9 +2548,9 @@ nsHttpChannel::GenCredsAndSetEntry(nsIHttpAuthenticator *auth,
// find out if this authenticator allows reuse of credentials and/or
// challenge.
PRBool saveCreds =
authFlags & nsIHttpAuthenticator::REUSABLE_CREDENTIALS;
0 != (authFlags & nsIHttpAuthenticator::REUSABLE_CREDENTIALS);
PRBool saveChallenge =
authFlags & nsIHttpAuthenticator::REUSABLE_CHALLENGE;
0 != (authFlags & nsIHttpAuthenticator::REUSABLE_CHALLENGE);
// this getter never fails
nsHttpAuthCache *authCache = gHttpHandler->AuthCache();

Просмотреть файл

@ -1080,9 +1080,9 @@ mozTXTToHTMLConv::CiteLevelTXT(const PRUnichar *line,
void
mozTXTToHTMLConv::ScanTXT(const PRUnichar * aInString, PRInt32 aInStringLength, PRUint32 whattodo, nsString& aOutString)
{
PRBool doURLs = whattodo & kURLs;
PRBool doGlyphSubstitution = whattodo & kGlyphSubstitution;
PRBool doStructPhrase = whattodo & kStructPhrase;
PRBool doURLs = 0 != (whattodo & kURLs);
PRBool doGlyphSubstitution = 0 != (whattodo & kGlyphSubstitution);
PRBool doStructPhrase = 0 != (whattodo & kStructPhrase);
PRUint32 structPhrase_strong = 0; // Number of currently open tags
PRUint32 structPhrase_underline = 0;