X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=buffer_tree.c;h=aff03444cc8cc3d0181812fc677c03bfa132e3b0;hb=59df964251d4e6b71b4ce6d02fdbb6e11643acab;hp=a5b1fd23362a20a73919166b1dbfae685279507e;hpb=455818b4d559c0294788f7b12ec64055244cb55f;p=paraslash.git diff --git a/buffer_tree.c b/buffer_tree.c index a5b1fd23..aff03444 100644 --- a/buffer_tree.c +++ b/buffer_tree.c @@ -805,7 +805,6 @@ next: para_list_add(&br->node, &btrn->input_queue); return; } - PARA_DEBUG_LOG("increasing wrap buffer, sz1: %zu, sz2: %zu\n", sz1, sz2); /* * We already have a wrap buffer, but it is too small. It might be * partially used. @@ -814,6 +813,8 @@ next: if (wbr->wrap_count == sz1 && wbr->btrb->size >= sz1 + sz2) /* nothing we can do about it */ return; sz = sz1 + sz2 - wbr->btrb->size; /* amount of new data */ + PARA_DEBUG_LOG("increasing wrap buffer %zu -> %zu\n", wbr->btrb->size, + wbr->btrb->size + sz); wbr->btrb->size += sz; wbr->btrb->buf = para_realloc(wbr->btrb->buf, wbr->btrb->size); /* copy the new data to the end of the reallocated buffer */ @@ -848,6 +849,7 @@ static int merge_input(struct btr_node *btrn) if (i == 2) break; } + assert(i == 2); /* make a new btrb that combines the two buffers and a br to it. */ sz = szs[0] + szs[1]; buf = para_malloc(sz);