From: Andre Noll Date: Sun, 17 Jan 2010 12:29:05 +0000 (+0100) Subject: [btr] Only print debug message if we're really increasing the wrap buffer. X-Git-Tag: v0.4.2~83 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=98ab15f91ac1b5127c86d5f0b6aed353f43ffd35 [btr] Only print debug message if we're really increasing the wrap buffer. --- diff --git a/buffer_tree.c b/buffer_tree.c index a5b1fd23..0ffe6246 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 */