Bug 398623: Fixed PRBool misuse bugs in extensions/spellcheck. r=mscott, a=dsicore
authortglek@mozilla.com
Fri, 05 Oct 2007 11:46:43 -0700
changeset 6666 09ed469e7c18cb260a72c9d3eaf74b69eaab1c42
parent 6665 c0ef978d8e12b4d8b10a4c75d03fccd1af3c5513
child 6667 10ecc40964e3149845948c2797269a4a0ae91e8a
push idunknown
push userunknown
push dateunknown
reviewersmscott, dsicore
bugs398623
milestone1.9a9pre
Bug 398623: Fixed PRBool misuse bugs in extensions/spellcheck. r=mscott, a=dsicore
extensions/spellcheck/hunspell/src/mozHunspell.cpp
extensions/spellcheck/src/mozInlineSpellChecker.cpp
--- a/extensions/spellcheck/hunspell/src/mozHunspell.cpp
+++ b/extensions/spellcheck/hunspell/src/mozHunspell.cpp
@@ -413,17 +413,17 @@ NS_IMETHODIMP mozHunspell::Check(const P
   NS_ENSURE_ARG_POINTER(aWord);
   NS_ENSURE_ARG_POINTER(aResult);
   NS_ENSURE_TRUE(mHunspell, NS_ERROR_FAILURE);
 
   nsXPIDLCString charsetWord;
   nsresult rv = ConvertCharset(aWord, getter_Copies(charsetWord));
   NS_ENSURE_SUCCESS(rv, rv);
 
-  *aResult = mHunspell->spell(charsetWord);
+  *aResult = !!mHunspell->spell(charsetWord);
 
 
   if (!*aResult && mPersonalDictionary) 
     rv = mPersonalDictionary->Check(aWord, mLanguage.get(), aResult);
   
   return rv;
 }
 
--- a/extensions/spellcheck/src/mozInlineSpellChecker.cpp
+++ b/extensions/spellcheck/src/mozInlineSpellChecker.cpp
@@ -1130,17 +1130,17 @@ mozInlineSpellChecker::SkipSpellCheckFor
       nsCOMPtr<nsIDOMNode> nextParent;
       parent->GetParentNode(getter_AddRefs(nextParent));
       parent = nextParent;
     }
   }
   else {
     // XXX Do we really want this for all read-write content?
     nsCOMPtr<nsIContent> content = do_QueryInterface(aNode);
-    *checkSpelling = content->IntrinsicState() & NS_EVENT_STATE_MOZ_READWRITE;
+    *checkSpelling = !!(content->IntrinsicState() & NS_EVENT_STATE_MOZ_READWRITE);
   }
 
   return NS_OK;
 }
 
 // mozInlineSpellChecker::ScheduleSpellCheck
 //
 //    This is called by code to do the actual spellchecking. We will set up