Bug 590970 - Don't compare PL_strcasecmp's return value to nsnull; r=joshmoz approval2.0=jst
authorMs2ger <ms2ger@gmail.com>
Thu, 02 Sep 2010 22:18:04 +0200
changeset 51925 2a26b596a01d34c6728ef7b3c0ffd7318db845b7
parent 51924 753feecdbd7cfe5c7afa1c6938d88c2bdf3138b6
child 51926 ba1849f86ade7eb01563f67cc1c28fec9e7b5b46
push idunknown
push userunknown
push dateunknown
reviewersjoshmoz
bugs590970
milestone2.0b6pre
Bug 590970 - Don't compare PL_strcasecmp's return value to nsnull; r=joshmoz approval2.0=jst
modules/plugin/base/src/nsPluginHost.cpp
--- a/modules/plugin/base/src/nsPluginHost.cpp
+++ b/modules/plugin/base/src/nsPluginHost.cpp
@@ -1817,23 +1817,23 @@ NS_IMETHODIMP nsPluginHost::GetPlugin(co
 // currently 'unwanted' plugins are Java, and all other plugins except
 // Acrobat, Flash, Quicktime and Shockwave
 static PRBool isUnwantedPlugin(nsPluginTag * tag)
 {
   if (tag->mFileName.IsEmpty())
     return PR_TRUE;
 
   for (PRInt32 i = 0; i < tag->mVariants; ++i) {
-    if (nsnull == PL_strcasecmp(tag->mMimeTypeArray[i], "application/pdf"))
+    if (!PL_strcasecmp(tag->mMimeTypeArray[i], "application/pdf"))
       return PR_FALSE;
 
-    if (nsnull == PL_strcasecmp(tag->mMimeTypeArray[i], "application/x-shockwave-flash"))
+    if (!PL_strcasecmp(tag->mMimeTypeArray[i], "application/x-shockwave-flash"))
       return PR_FALSE;
 
-    if (nsnull == PL_strcasecmp(tag->mMimeTypeArray[i],"application/x-director"))
+    if (!PL_strcasecmp(tag->mMimeTypeArray[i], "application/x-director"))
       return PR_FALSE;
   }
 
   // On Windows, we also want to include the Quicktime plugin from the 4.x directory
   // But because it spans several DLL's, the best check for now is by filename
   if (tag->mFileName.Find("npqtplugin", PR_TRUE, 0, -1) != kNotFound)
     return PR_FALSE;