output_buffer: only realloc once, and memset just what we need
authorJens Axboe <axboe@fb.com>
Sat, 31 Oct 2015 01:34:21 +0000 (19:34 -0600)
committerJens Axboe <axboe@fb.com>
Sat, 31 Oct 2015 01:34:21 +0000 (19:34 -0600)
commitf6cbf8ac4f70c800bbbfc23c5dcf44ed619c0acc
treee4a8831ac883eacdf3e4186f070a243834ad4462
parent125451c0455dfcfd11dbcf9570d23218ed4b8ad3
output_buffer: only realloc once, and memset just what we need

No need looping around a realloc(), just alloc what we need upfront.
Additionally, don't memset the parts we'll be copying into anyway.

Signed-off-by: Jens Axboe <axboe@fb.com>
lib/output_buffer.c