Fix some && within || warnings, no bug
authorDavid Zbarsky <dzbarsky@gmail.com>
Mon, 15 Oct 2012 21:00:21 -0400
changeset 110488 758c495dae14009c1428d308e5b1c79f3c201b25
parent 110487 14f09c2fb04ccb82a478ac23fabf9c79ab9bc248
child 110489 5e31a0fc42bed8b33902f6a77baf40d12b812f5a
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
milestone19.0a1
Fix some && within || warnings, no bug
docshell/base/nsDocShell.cpp
extensions/universalchardet/src/base/JpCntx.cpp
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -11105,18 +11105,18 @@ nsDocShell::AddURIVisit(nsIURI* aURI,
         if (aResponseStatus >= 300 && aResponseStatus < 400) {
             visitURIFlags |= IHistory::REDIRECT_SOURCE;
         }
         // Errors 400-501 and 505 are considered unrecoverable, in the sense a
         // simple retry attempt by the user is unlikely to solve them.
         // 408 is special cased, since may actually indicate a temporary
         // connection problem.
         else if (aResponseStatus != 408 &&
-                 (aResponseStatus >= 400 && aResponseStatus <= 501 ||
-                  aResponseStatus == 505)) {
+                 ((aResponseStatus >= 400 && aResponseStatus <= 501) ||
+                   aResponseStatus == 505)) {
             visitURIFlags |= IHistory::UNRECOVERABLE_ERROR;
         }
 
         (void)history->VisitURI(aURI, aPreviousURI, visitURIFlags);
     }
     else if (mGlobalHistory) {
         // Falls back to sync global history interface.
         (void)mGlobalHistory->AddURI(aURI,
--- a/extensions/universalchardet/src/base/JpCntx.cpp
+++ b/extensions/universalchardet/src/base/JpCntx.cpp
@@ -176,18 +176,18 @@ int32_t SJISContextAnalysis::GetOrder(co
     return (unsigned char)*(str+1) - (unsigned char)0x9f;
   return -1;
 }
 
 int32_t EUCJPContextAnalysis::GetOrder(const char* str, uint32_t *charLen)
 {
   //find out current char's byte length
   if ((unsigned char)*str == (unsigned char)0x8e ||
-      (unsigned char)*str >= (unsigned char)0xa1 && 
-      (unsigned char)*str <= (unsigned char)0xfe)
+      ((unsigned char)*str >= (unsigned char)0xa1 &&
+       (unsigned char)*str <= (unsigned char)0xfe))
       *charLen = 2;
   else if ((unsigned char)*str == (unsigned char)0x8f)
     *charLen = 3;
   else
     *charLen = 1;
 
   //return its order if it is hiragana
   if ((unsigned char)*str == (unsigned char)0xa4 &&