Tuvie commented on code in PR #2005:
URL: https://github.com/apache/incubator-brpc/pull/2005#discussion_r1029985331


##########
src/butil/iobuf.cpp:
##########
@@ -1206,7 +1211,14 @@ int IOBuf::appendv(const const_iovec* vec, size_t n) {
     return 0;
 }
 
-int IOBuf::append_user_data(void* data, size_t size, void (*deleter)(void*)) {
+int IOBuf::append_user_data_with_meta(void* data,
+                                      size_t size,
+                                      void (*deleter)(void*),
+                                      uint64_t meta) {
+    if (size == 0) {
+        LOG(WARNING) << "data_size should not be 0";
+        return -1;

Review Comment:
   This should be unexpected. return -1 is a better choice.



-- 
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: dev-unsubscr...@brpc.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org

Reply via email to