From aa068da743f42b8325c3b113aff22ecc0955a69b Mon Sep 17 00:00:00 2001 From: "rjc%netscape.com" Date: Thu, 6 Sep 2007 21:56:54 +0000 Subject: [PATCH] Fix simple signed/unsigned comparison warning. --- suite/browser/src/nsInternetSearchService.cpp | 2 +- suite/browser/src/nsLocalSearchService.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/suite/browser/src/nsInternetSearchService.cpp b/suite/browser/src/nsInternetSearchService.cpp index 6394e57ba28..be0e7e086c0 100755 --- a/suite/browser/src/nsInternetSearchService.cpp +++ b/suite/browser/src/nsInternetSearchService.cpp @@ -2659,7 +2659,7 @@ InternetSearchDataSource::GetSearchEngineList(nsFileSpec nativeDir, PRBool check nsAutoString iconURL; PRInt32 extensionOffset; extensionOffset = uri.RFind(".src", PR_TRUE); - if ((extensionOffset >= 0) && (extensionOffset == uri.Length()-4)) + if ((extensionOffset >= 0) && (extensionOffset == len-4)) { nsAutoString temp; diff --git a/suite/browser/src/nsLocalSearchService.cpp b/suite/browser/src/nsLocalSearchService.cpp index 61a112688d0..0ac2c330f46 100755 --- a/suite/browser/src/nsLocalSearchService.cpp +++ b/suite/browser/src/nsLocalSearchService.cpp @@ -454,7 +454,7 @@ LocalSearchDataSource::doMatch(nsIRDFLiteral *literal, char *matchMethod, char * else if (!PL_strcmp(matchMethod, "endswith")) { PRInt32 pos = value.RFind(matchText, PR_TRUE); - if ((pos >= 0) && (pos == (value.Length() - PRInt32(strlen(matchText))))) + if ((pos >= 0) && (pos == (PRInt32(value.Length()) - PRInt32(strlen(matchText))))) found = PR_TRUE; } else if (!PL_strcmp(matchMethod, "is"))