summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
b660aec)
There is no need to abort on the attempt to add a zero sized buffer.
Let's be gentle and make this condition a noop rather than a fatal
error.
{
struct btr_buffer *btrb;
{
struct btr_buffer *btrb;
+ if (size == 0)
+ return;
if (list_empty(&btrn->children)) {
free(buf);
return;
if (list_empty(&btrn->children)) {
free(buf);
return;
{
struct btr_buffer *btrb;
{
struct btr_buffer *btrb;
+ if (size == 0)
+ return;
if (list_empty(&btrn->children))
return;
btrb = new_btrb((char *)buf, size);
if (list_empty(&btrn->children))
return;
btrb = new_btrb((char *)buf, size);
+ if (size == 0)
+ return;
if (list_empty(&btrn->children))
return;
avail = btr_pool_get_buffer(btrp, &buf);
if (list_empty(&btrn->children))
return;
avail = btr_pool_get_buffer(btrp, &buf);