diff --git a/docshell/base/nsDefaultURIFixup.cpp b/docshell/base/nsDefaultURIFixup.cpp index a1e82b41227bf..c1289747c5342 100644 --- a/docshell/base/nsDefaultURIFixup.cpp +++ b/docshell/base/nsDefaultURIFixup.cpp @@ -706,7 +706,7 @@ nsDefaultURIFixup::FixupURIProtocol(const nsACString& aURIString, // no-scheme.com/query?foo=http://www.foo.com // user:pass@no-scheme.com // - int32_t schemeDelim = uriString.Find("://", 0); + int32_t schemeDelim = uriString.Find("://"); int32_t firstDelim = uriString.FindCharInSet("/:"); if (schemeDelim <= 0 || (firstDelim != -1 && schemeDelim > firstDelim)) { diff --git a/dom/media/gmp/ChromiumCDMChild.cpp b/dom/media/gmp/ChromiumCDMChild.cpp index e69b0193ec4e9..30ed1bca8f185 100644 --- a/dom/media/gmp/ChromiumCDMChild.cpp +++ b/dom/media/gmp/ChromiumCDMChild.cpp @@ -241,7 +241,7 @@ ChromiumCDMChild::OnResolveNewSessionPromiseInternal(uint32_t aPromiseId, // a session it calls OnResolveNewSessionPromise with nullptr as the sessionId. // We can safely assume this means that we have failed to load a session // as the other methods specify calling 'OnRejectPromise' when they fail. - bool loadSuccessful = aSessionId != nullptr; + bool loadSuccessful = !aSessionId.IsEmpty(); GMP_LOG("ChromiumCDMChild::OnResolveNewSessionPromise(pid=%u, sid=%s) " "resolving %s load session ", aPromiseId, diff --git a/toolkit/components/places/nsNavHistory.cpp b/toolkit/components/places/nsNavHistory.cpp index e6138d8588a33..554d4236afc1a 100644 --- a/toolkit/components/places/nsNavHistory.cpp +++ b/toolkit/components/places/nsNavHistory.cpp @@ -1963,7 +1963,7 @@ PlacesSQLQueryBuilder::Where() // If we used WHERE already, we inject the conditions // in place of {ADDITIONAL_CONDITIONS} - if (mQueryString.Find("{ADDITIONAL_CONDITIONS}", 0) != kNotFound) { + if (mQueryString.Find("{ADDITIONAL_CONDITIONS}") != kNotFound) { nsAutoCString innerCondition; // If we have condition AND it if (!mConditions.IsEmpty()) { diff --git a/toolkit/components/url-classifier/Classifier.cpp b/toolkit/components/url-classifier/Classifier.cpp index 0cf3350ad3a99..404e31e2421e2 100644 --- a/toolkit/components/url-classifier/Classifier.cpp +++ b/toolkit/components/url-classifier/Classifier.cpp @@ -989,7 +989,7 @@ Classifier::ScanStoreDir(nsIFile* aDirectory, nsTArray& aTables) // Both v2 and v4 contain .pset file nsCString suffix(NS_LITERAL_CSTRING(".pset")); - int32_t dot = leafName.RFind(suffix, 0); + int32_t dot = leafName.RFind(suffix); if (dot != -1) { leafName.Cut(dot, suffix.Length()); aTables.AppendElement(leafName); @@ -1579,7 +1579,7 @@ Classifier::LoadMetadata(nsIFile* aDirectory, nsACString& aResult) rv = file->GetNativeLeafName(tableName); NS_ENSURE_SUCCESS(rv, rv); - int32_t dot = tableName.RFind(METADATA_SUFFIX, 0); + int32_t dot = tableName.RFind(METADATA_SUFFIX); if (dot == -1) { continue; }