acelyc111 commented on code in PR #1938:
URL: 
https://github.com/apache/incubator-pegasus/pull/1938#discussion_r1519282465


##########
src/runtime/rpc/rpc_message.cpp:
##########
@@ -252,6 +252,7 @@ message_ex *message_ex::copy(bool clone_content, bool 
copy_for_receive)
 
         if ((const char *)header != buffers[0].data()) {
             memcpy(ptr, (const void *)header, sizeof(message_header));
+            i += sizeof(message_header);

Review Comment:
   How about removing the `i` variable totally, you can compare the offset of 
`ptr` and `recv_buffer` instead in line 264.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to