зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1473453 - Part 2: QuotaManager: disambiguate null check of bool pointer. r=janv
Fix clang-tidy warning about bool pointers: [misc-bool-pointer-implicit-conversion] dom/quota/ActorsParent.cpp:4168:7: warning: dubious check of 'bool *' against 'nullptr', did you mean to dereference it? MozReview-Commit-ID: C6QdeJlf71C --HG-- extra : rebase_source : cb2e19e41bed6cc1456e89acce65747558306bcf
This commit is contained in:
Родитель
16cc517cf9
Коммит
9513c25210
|
@ -4147,7 +4147,7 @@ QuotaManager::GetDirectoryMetadata2(nsIFile* aDirectory,
|
|||
{
|
||||
AssertIsOnIOThread();
|
||||
MOZ_ASSERT(aDirectory);
|
||||
MOZ_ASSERT(aTimestamp || aPersisted);
|
||||
MOZ_ASSERT(aTimestamp != nullptr || aPersisted != nullptr);
|
||||
MOZ_ASSERT(mStorageInitialized);
|
||||
|
||||
nsCOMPtr<nsIBinaryInputStream> binaryStream;
|
||||
|
@ -4165,17 +4165,17 @@ QuotaManager::GetDirectoryMetadata2(nsIFile* aDirectory,
|
|||
}
|
||||
|
||||
bool persisted;
|
||||
if (aPersisted) {
|
||||
if (aPersisted != nullptr) {
|
||||
rv = binaryStream->ReadBoolean(&persisted);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
|
||||
if (aTimestamp) {
|
||||
if (aTimestamp != nullptr) {
|
||||
*aTimestamp = timestamp;
|
||||
}
|
||||
if (aPersisted) {
|
||||
if (aPersisted != nullptr) {
|
||||
*aPersisted = persisted;
|
||||
}
|
||||
return NS_OK;
|
||||
|
|
Загрузка…
Ссылка в новой задаче