dedup

deduplicating backup program
git clone git://git.2f30.org/dedup
Log | Files | Refs | README | LICENSE

commit 528b7c40c8b3dbcbce387f35f6de93e21f2860e0
parent 8ed79b4311c4715717198c0e04dd06efb29be265
Author: sin <sin@2f30.org>
Date:   Thu, 21 Feb 2019 13:52:54 +0000

Fix get_chunk()

Diffstat:
Mchunker.c | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/chunker.c b/chunker.c @@ -93,10 +93,13 @@ fill_chunker(struct chunker *chunker) uint8_t * get_chunk(struct chunker *chunker, size_t *chunk_size) { + uint8_t *bp; + assert(chunker->rpos <= chunker->wpos); + bp = &chunker->buf[chunker->rpos]; *chunk_size = get_chunk_size(chunker); chunker->rpos += *chunk_size; - return chunker->buf; + return bp; } void