From e499fe63c891392ed7e160b61f47a69d2991919f Mon Sep 17 00:00:00 2001 From: Leonard Chan Date: Mon, 10 Jun 2024 17:48:30 -0700 Subject: [PATCH] [libc][stdlib] Change old unsigned short variables to size_t They were assigned from calls to find_chunk_ptr_for_size which return size_t now. --- libc/src/stdlib/freelist.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libc/src/stdlib/freelist.h b/libc/src/stdlib/freelist.h index 20b4977835bef..c01ed6eddb7d4 100644 --- a/libc/src/stdlib/freelist.h +++ b/libc/src/stdlib/freelist.h @@ -99,7 +99,7 @@ bool FreeList::add_chunk(span chunk) { aliased.bytes = chunk.data(); - unsigned short chunk_ptr = find_chunk_ptr_for_size(chunk.size(), false); + size_t chunk_ptr = find_chunk_ptr_for_size(chunk.size(), false); // Add it to the correct list. aliased.node->size = chunk.size(); @@ -114,7 +114,7 @@ span FreeList::find_chunk(size_t size) const { if (size == 0) return span(); - unsigned short chunk_ptr = find_chunk_ptr_for_size(size, true); + size_t chunk_ptr = find_chunk_ptr_for_size(size, true); // Check that there's data. This catches the case where we run off the // end of the array @@ -144,7 +144,7 @@ span FreeList::find_chunk(size_t size) const { template bool FreeList::remove_chunk(span chunk) { - unsigned short chunk_ptr = find_chunk_ptr_for_size(chunk.size(), true); + size_t chunk_ptr = find_chunk_ptr_for_size(chunk.size(), true); // Walk that list, finding the chunk. union {