From 23b8cb99a9b23b150aa94a79103e77bbbfb20e31 Mon Sep 17 00:00:00 2001 From: "dietrich@mozilla.com" Date: Tue, 29 Jan 2008 21:04:55 -0800 Subject: [PATCH] Bug 413561 ? PRBool misuse (easy fix) (r=dietrich, a=mconnor) --- .../components/places/src/nsNavHistory.cpp | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/toolkit/components/places/src/nsNavHistory.cpp b/toolkit/components/places/src/nsNavHistory.cpp index ec75149b3d8..5eddaf65f7c 100644 --- a/toolkit/components/places/src/nsNavHistory.cpp +++ b/toolkit/components/places/src/nsNavHistory.cpp @@ -1980,7 +1980,7 @@ nsNavHistory::EvaluateQueryForNode(const nsCOMArray& aQueries // easy case: the URI is an exact match PRBool equals; nsresult rv = query->Uri()->Equals(nodeUri, &equals); - NS_ENSURE_SUCCESS(rv, rv); + NS_ENSURE_SUCCESS(rv, PR_FALSE); if (! equals) continue; } else { @@ -2309,7 +2309,7 @@ nsNavHistory::AddVisit(nsIURI* aURI, PRTime aTime, nsIURI* aReferringURI, rv = mDBGetPageVisitStats->GetInt32(2, &oldTypedState); NS_ENSURE_SUCCESS(rv, rv); - PRInt32 oldHiddenState = 0; + PRBool oldHiddenState = 0; rv = mDBGetPageVisitStats->GetInt32(3, &oldHiddenState); NS_ENSURE_SUCCESS(rv, rv); @@ -4754,17 +4754,17 @@ nsNavHistory::URIHasTag(const nsACString& aURISpec, const nsAString& aTag) mozStorageStatementScoper scoper(mDBURIHasTag); nsresult rv = mDBURIHasTag->BindUTF8StringParameter(0, aURISpec); - NS_ENSURE_SUCCESS(rv, rv); + NS_ENSURE_SUCCESS(rv, PR_FALSE); rv = mDBURIHasTag->BindStringParameter(1, aTag); - NS_ENSURE_SUCCESS(rv, rv); + NS_ENSURE_SUCCESS(rv, PR_FALSE); rv = mDBURIHasTag->BindInt64Parameter(2, GetTagsFolder()); - NS_ENSURE_SUCCESS(rv, rv); + NS_ENSURE_SUCCESS(rv, PR_FALSE); PRBool hasTag = PR_FALSE; rv = mDBURIHasTag->ExecuteStep(&hasTag); - NS_ENSURE_SUCCESS(rv, rv); + NS_ENSURE_SUCCESS(rv, PR_FALSE); return hasTag; } @@ -4830,23 +4830,23 @@ nsNavHistory::URIHasAnyTagFromTerms(const nsACString& aURISpec, const nsStringAr nsCOMPtr uriHasAnyTagQuery; nsresult rv = mDBConn->CreateStatement(tagQuery, getter_AddRefs(uriHasAnyTagQuery)); - NS_ENSURE_SUCCESS(rv, rv); + NS_ENSURE_SUCCESS(rv, PR_FALSE); rv = uriHasAnyTagQuery->BindUTF8StringParameter(0, aURISpec); - NS_ENSURE_SUCCESS(rv, rv); + NS_ENSURE_SUCCESS(rv, PR_FALSE); rv = uriHasAnyTagQuery->BindInt64Parameter(1, GetTagsFolder()); - NS_ENSURE_SUCCESS(rv, rv); + NS_ENSURE_SUCCESS(rv, PR_FALSE); for (PRUint32 i=0; iBindStringParameter(i+2, *(aTerms.StringAt(i))); - NS_ENSURE_SUCCESS(rv, rv); + NS_ENSURE_SUCCESS(rv, PR_FALSE); } PRBool hasAnyTag = PR_FALSE; rv = uriHasAnyTagQuery->ExecuteStep(&hasAnyTag); - NS_ENSURE_SUCCESS(rv, rv); + NS_ENSURE_SUCCESS(rv, PR_FALSE); return hasAnyTag; }