Bug 1319408 - Replace integer literals which are cast to bool in embedding/. draft
authorAndi-Bogdan Postelnicu <bpostelnicu@mozilla.com>
Tue, 22 Nov 2016 14:57:41 +0200
changeset 442390 a0158e577a46b9b613218021e3ec538df7f34898
parent 442389 d432c58014a0be48992b5151df8c038d44b385ad
child 537794 0066446de06dd9202b3f8e93fd306fa8246d2301
push id36698
push userbmo:bpostelnicu@mozilla.com
push dateTue, 22 Nov 2016 13:14:55 +0000
bugs1319408
milestone53.0a1
Bug 1319408 - Replace integer literals which are cast to bool in embedding/. 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);