Bug 504934: Add braces to an "if/else" cascade to fix build warning. r+sr=jst
authorDaniel Holbert <dholbert@cs.stanford.edu>
Mon, 20 Jul 2009 15:29:32 -0700
changeset 30473 02ff5f05a1a66d2b2bc015bf7fefd04790ec0a3e
parent 30472 860db9cc9e2bd58ad4b81aad2f7955ff615ff5d6
child 30474 a568cdcd510d572e9035b554c7d028de5503d7a8
push id8100
push userdholbert@mozilla.com
push dateMon, 20 Jul 2009 22:30:04 +0000
treeherdermozilla-central@02ff5f05a1a6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs504934
milestone1.9.2a1pre
Bug 504934: Add braces to an "if/else" cascade to fix build warning. r+sr=jst
extensions/permissions/nsContentBlocker.cpp
--- a/extensions/permissions/nsContentBlocker.cpp
+++ b/extensions/permissions/nsContentBlocker.cpp
@@ -176,22 +176,23 @@ nsContentBlocker::ShouldLoad(PRUint32   
       !scheme.LowerCaseEqualsLiteral("http") &&
       !scheme.LowerCaseEqualsLiteral("https"))
     return NS_OK;
 
   PRBool shouldLoad, fromPrefs;
   rv = TestPermission(aContentLocation, aRequestingLocation, aContentType,
                       &shouldLoad, &fromPrefs);
   NS_ENSURE_SUCCESS(rv, rv);
-  if (!shouldLoad)
-    if (fromPrefs)
+  if (!shouldLoad) {
+    if (fromPrefs) {
       *aDecision = nsIContentPolicy::REJECT_TYPE;
-    else
+    } else {
       *aDecision = nsIContentPolicy::REJECT_SERVER;
-
+    }
+  }
   if (aContentType != nsIContentPolicy::TYPE_OBJECT || aMimeGuess.IsEmpty())
     return NS_OK;
 
   // For TYPE_OBJECT we should check what aMimeGuess might tell us
   // about what sort of object it is.
   nsCOMPtr<nsIObjectLoadingContent> objectLoader =
     do_QueryInterface(aRequestingContext);
   if (!objectLoader)