emkornfield commented on a change in pull request #10627: URL: https://github.com/apache/arrow/pull/10627#discussion_r664738151
########## File path: cpp/src/arrow/util/bit_stream_utils.h ########## @@ -418,14 +450,65 @@ inline bool BitReader::GetVlqInt(uint32_t* v) { } inline bool BitWriter::PutZigZagVlqInt(int32_t v) { - auto u_v = ::arrow::util::SafeCopy<uint32_t>(v); - return PutVlqInt((u_v << 1) ^ (u_v >> 31)); + uint32_t u_v = ::arrow::util::SafeCopy<uint32_t>(v); + v = (u_v << 1) ^ (v >> 31); + u_v = ::arrow::util::SafeCopy<uint32_t>(v); Review comment: and elimnate this line. -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org