imay commented on a change in pull request #4366: URL: https://github.com/apache/incubator-doris/pull/4366#discussion_r471368389
########## File path: be/src/util/coding.h ########## @@ -143,7 +143,7 @@ extern uint8_t* encode_varint64(uint8_t* dst, uint64_t value); inline uint8_t* encode_varint64(uint8_t* dst, uint64_t v) { static const unsigned int B = 128; while (v >= B) { - *(dst++) = (v & (B - 1)) | B; + *(dst++) = v | B; Review comment: (v | B) & (11111111) != v | B If v = 1011111111 (v | B) = 1011111111 (v | B) & (11111111) = 11111111 ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org