Bug 686558 - Get rid of gcc warning about "enumeral mismatch" in nsNetUtil.h. r=bz
authorJason Duell <jduell.mcbugs@gmail.com>
Tue, 13 Sep 2011 15:15:28 -0700
changeset 76926 52418d4fe38b86e6338a680306a28d9b0fe2ee90
parent 76925 d2330354d3fb2a562b97227fa2a7a41ff6f2b143
child 76927 aba82063bca704a059b6a59862c80999f3215d0c
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
reviewersbz
bugs686558
milestone9.0a1
Bug 686558 - Get rid of gcc warning about "enumeral mismatch" in nsNetUtil.h. r=bz
netwerk/base/public/nsNetUtil.h
--- a/netwerk/base/public/nsNetUtil.h
+++ b/netwerk/base/public/nsNetUtil.h
@@ -1941,19 +1941,19 @@ NS_GetContentDispositionFromHeader(const
   }
 
   nsAutoString dispToken;
   rv = mimehdrpar->GetParameter(aHeader, "", fallbackCharset, PR_TRUE, nsnull,
                                 dispToken);
 
   if (NS_FAILED(rv)) {
     // special case (see bug 272541): empty disposition type handled as "inline"
-    return rv == NS_ERROR_FIRST_HEADER_FIELD_COMPONENT_EMPTY
-                 ? nsIChannel::DISPOSITION_INLINE
-                 : nsIChannel::DISPOSITION_ATTACHMENT;
+    if (rv == NS_ERROR_FIRST_HEADER_FIELD_COMPONENT_EMPTY)
+        return nsIChannel::DISPOSITION_INLINE;
+    return nsIChannel::DISPOSITION_ATTACHMENT;
   }
 
   return NS_GetContentDispositionFromToken(dispToken);
 }
 
 /** Extracts the filename out of a content-disposition header
  * @param aFilename [out] The filename. Can be empty on error.
  * @param aDisposition Value of a Content-Disposition header