[go: nahoru, domu]

Skip to content

Commit

Permalink
Make h2o_buffer_append's return an int since it's used as a boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
deweerdt committed Jul 11, 2017
1 parent ee48f91 commit 0a2726d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/h2o/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ h2o_iovec_t h2o_buffer_reserve(h2o_buffer_t **inbuf, size_t min_guarantee);
* copies @len bytes from @src to @dst, calling h2o_buffer_reserve
* @return 0 if the allocation failed, 1 otherwise
*/
static ssize_t h2o_buffer_append(h2o_buffer_t **dst, void *src, size_t len);
static int h2o_buffer_append(h2o_buffer_t **dst, void *src, size_t len);
/**
* throws away given size of the data from the buffer.
* @param delta number of octets to be drained from the buffer
Expand Down Expand Up @@ -392,7 +392,7 @@ inline void h2o_buffer_link_to_pool(h2o_buffer_t *buffer, h2o_mem_pool_t *pool)
*slot = buffer;
}

inline ssize_t h2o_buffer_append(h2o_buffer_t **dst, void *src, size_t len)
inline int h2o_buffer_append(h2o_buffer_t **dst, void *src, size_t len)
{
h2o_iovec_t buf = h2o_buffer_reserve(dst, len);
if (buf.base == NULL)
Expand Down

0 comments on commit 0a2726d

Please sign in to comment.