pitrou commented on code in PR #49883:
URL: https://github.com/apache/arrow/pull/49883#discussion_r3389458054
##########
cpp/src/arrow/buffer_builder.h:
##########
@@ -91,11 +102,25 @@ class ARROW_EXPORT BufferBuilder {
/// \param[in] additional_bytes number of additional bytes to make space for
/// \return Status
Status Reserve(const int64_t additional_bytes) {
- auto min_capacity = size_ + additional_bytes;
+ if (ARROW_PREDICT_FALSE(additional_bytes < 0)) {
Review Comment:
Sorry for the delay, but it seems you haven't responded to this review
comment. Is it possible to avoid repeating these checks using some common
helpers?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]