]> granicus.if.org Git - libevent/commitdiff
Specify return behavior in header for evbuffer_pullup() in corner case
authorDan Petro <dan.petro@datasoft.com>
Fri, 29 Mar 2013 16:28:35 +0000 (09:28 -0700)
committerDan Petro <dan.petro@datasoft.com>
Fri, 29 Mar 2013 16:28:35 +0000 (09:28 -0700)
Function returns NULL when told to pullup more data than exists

include/event2/buffer.h

index b36ee145836389e85adb2583e6eb8c4a65ca06e1..712e4d79254570fa1c3995b31e5b18273b6a891e 100644 (file)
@@ -944,7 +944,8 @@ void evbuffer_cb_unsuspend(struct evbuffer *buffer, struct evbuffer_cb_entry *cb
   @param buf the evbuffer to make contiguous
   @param size the number of bytes to make contiguous, or -1 to make the
        entire buffer contiguous.
-  @return a pointer to the contiguous memory array
+  @return a pointer to the contiguous memory array, or NULL if param size
+       requested more data than is present in the buffer.
 */
 
 unsigned char *evbuffer_pullup(struct evbuffer *buf, ev_ssize_t size);