# HG changeset patch # User Chris Peterson # Date 1530740811 25200 # Node ID fb7269b3d9b2ac392c603abe1ff7b2f104424483 # Parent c9a21222f48d6136af7c31411e0015e08707e3d4 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 diff --git a/dom/quota/ActorsParent.cpp b/dom/quota/ActorsParent.cpp --- a/dom/quota/ActorsParent.cpp +++ b/dom/quota/ActorsParent.cpp @@ -4153,17 +4153,17 @@ QuotaManager::GetDirectoryMetadata2WithR nsresult QuotaManager::GetDirectoryMetadata2(nsIFile* aDirectory, int64_t* aTimestamp, bool* aPersisted) { AssertIsOnIOThread(); MOZ_ASSERT(aDirectory); - MOZ_ASSERT(aTimestamp || aPersisted); + MOZ_ASSERT(aTimestamp != nullptr || aPersisted != nullptr); MOZ_ASSERT(mStorageInitialized); nsCOMPtr binaryStream; nsresult rv = GetBinaryInputStream(aDirectory, NS_LITERAL_STRING(METADATA_V2_FILE_NAME), getter_AddRefs(binaryStream)); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; @@ -4171,27 +4171,27 @@ QuotaManager::GetDirectoryMetadata2(nsIF uint64_t timestamp; rv = binaryStream->Read64(×tamp); if (NS_WARN_IF(NS_FAILED(rv))) { return rv; } 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; } nsresult QuotaManager::GetDirectoryMetadata2WithRestore(nsIFile* aDirectory, bool aPersistent,