summaryrefslogtreecommitdiff
path: root/io_buffer.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2025-12-17 14:28:03 +0900
committerNobuyoshi Nakada <nobu.nakada@gmail.com>2025-12-17 17:35:58 +0900
commit61bab1889048f758396acf671c9797d6bc52504b (patch)
tree63c950e697d3d41a0920d9b8c834f55a745307c4 /io_buffer.c
parent79f36c544a0431d9b76c3c11a5f622383eaca7bd (diff)
Rename to `struct rbimpl_size_overflow_tag`
This struct is used for addition not only for multiplication, so remove the word `mul`, and make the member names more descriptive.
Diffstat (limited to 'io_buffer.c')
-rw-r--r--io_buffer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/io_buffer.c b/io_buffer.c
index 1ee2bc9324..85061076cd 100644
--- a/io_buffer.c
+++ b/io_buffer.c
@@ -1527,8 +1527,8 @@ VALUE rb_io_buffer_free_locked(VALUE self)
static bool
size_sum_is_bigger_than(size_t a, size_t b, size_t x)
{
- struct rbimpl_size_mul_overflow_tag size = rbimpl_size_add_overflow(a, b);
- return size.left || size.right > x;
+ struct rbimpl_size_overflow_tag size = rbimpl_size_add_overflow(a, b);
+ return size.overflowed || size.result > x;
}
// Validate that access to the buffer is within bounds, assuming you want to