Skip to content

Commit 39cf880

Browse files
authored
[libc][stdlib] Change old unsigned short variables to size_t (#95065)
They were assigned from calls to find_chunk_ptr_for_size which return size_t now.
1 parent 69e9e77 commit 39cf880

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libc/src/stdlib/freelist.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ bool FreeList<NUM_BUCKETS>::add_chunk(span<cpp::byte> chunk) {
9999

100100
aliased.bytes = chunk.data();
101101

102-
unsigned short chunk_ptr = find_chunk_ptr_for_size(chunk.size(), false);
102+
size_t chunk_ptr = find_chunk_ptr_for_size(chunk.size(), false);
103103

104104
// Add it to the correct list.
105105
aliased.node->size = chunk.size();
@@ -114,7 +114,7 @@ span<cpp::byte> FreeList<NUM_BUCKETS>::find_chunk(size_t size) const {
114114
if (size == 0)
115115
return span<cpp::byte>();
116116

117-
unsigned short chunk_ptr = find_chunk_ptr_for_size(size, true);
117+
size_t chunk_ptr = find_chunk_ptr_for_size(size, true);
118118

119119
// Check that there's data. This catches the case where we run off the
120120
// end of the array
@@ -144,7 +144,7 @@ span<cpp::byte> FreeList<NUM_BUCKETS>::find_chunk(size_t size) const {
144144

145145
template <size_t NUM_BUCKETS>
146146
bool FreeList<NUM_BUCKETS>::remove_chunk(span<cpp::byte> chunk) {
147-
unsigned short chunk_ptr = find_chunk_ptr_for_size(chunk.size(), true);
147+
size_t chunk_ptr = find_chunk_ptr_for_size(chunk.size(), true);
148148

149149
// Walk that list, finding the chunk.
150150
union {

0 commit comments

Comments
 (0)