Bug 1319408 - Replace integer literals which are cast to bool in embedding/. r=myk
authorAndi-Bogdan Postelnicu <bpostelnicu@mozilla.com>
Tue, 22 Nov 2016 14:57:41 +0200
changeset 324538 ac823431b8adfdf8062022558fadb4dbe255aa9c
parent 324537 096d333c2ba246349eb2bee90b3e6f2dabf1298a
child 324539 5bb4e5f0635a6da9c734bdb89b143229ce043c70
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewersmyk
bugs1319408
milestone53.0a1
Bug 1319408 - Replace integer literals which are cast to bool in embedding/. r=myk MozReview-Commit-ID: 3PLvkLGG45T
embedding/components/webbrowserpersist/nsWebBrowserPersist.cpp
--- a/embedding/components/webbrowserpersist/nsWebBrowserPersist.cpp
+++ b/embedding/components/webbrowserpersist/nsWebBrowserPersist.cpp
@@ -2008,17 +2008,17 @@ nsWebBrowserPersist::CalculateUniqueFile
     // Create a filename if it's empty, or if the filename / datapath is
     // already taken by another URI and create an alternate name.
 
     if (base.IsEmpty() || !mFilenameList.IsEmpty())
     {
         nsAutoCString tmpPath;
         nsAutoCString tmpBase;
         uint32_t duplicateCounter = 1;
-        while (1)
+        while (true)
         {
             // Make a file name,
             // Foo become foo_001, foo_002, etc.
             // Empty files become _001, _002 etc.
 
             if (base.IsEmpty() || duplicateCounter > 1)
             {
                 char * tmp = PR_smprintf("_%03d", duplicateCounter);