summaryrefslogtreecommitdiff
path: root/third_party/base/allocator/partition_allocator
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/base/allocator/partition_allocator')
-rw-r--r--third_party/base/allocator/partition_allocator/partition_alloc.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/third_party/base/allocator/partition_allocator/partition_alloc.h b/third_party/base/allocator/partition_allocator/partition_alloc.h
index 04ae17014a..5832b9f4be 100644
--- a/third_party/base/allocator/partition_allocator/partition_alloc.h
+++ b/third_party/base/allocator/partition_allocator/partition_alloc.h
@@ -660,7 +660,7 @@ ALWAYS_INLINE void* PartitionBucketAlloc(PartitionRootBase* root,
// Check that this page is neither full nor freed.
DCHECK(page->num_allocated_slots >= 0);
void* ret = page->freelist_head;
- if (LIKELY(ret != 0)) {
+ if (LIKELY(ret)) {
// If these asserts fire, you probably corrupted memory.
DCHECK(PartitionPointerIsValid(ret));
// All large allocations must go through the slow path to correctly
@@ -676,7 +676,7 @@ ALWAYS_INLINE void* PartitionBucketAlloc(PartitionRootBase* root,
}
#if DCHECK_IS_ON()
if (!ret)
- return 0;
+ return nullptr;
// Fill the uninitialized pattern, and write the cookies.
page = PartitionPointerToPage(ret);
size_t slot_size = page->bucket->slot_size;