dedup

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

commit a6ea30e905c83777492ec18cb59aed7769d94ba5
parent b225ea67c4500992507a9e417e3e103777c2864e
Author: sin <sin@2f30.org>
Date:   Mon, 25 Feb 2019 15:36:19 +0000

Make match_pattern() inline as well

Diffstat:
Mchunker.c | 14+++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/chunker.c b/chunker.c @@ -81,13 +81,7 @@ buzh_update(uint32_t fp, uint8_t in, uint8_t out, size_t winsize) return ROTL(fp, 1) ^ ROTL(buz[out], winsize % 32) ^ buz[in]; } -static size_t -calc_discr(size_t avg) -{ - return avg / (-1.42888852e-7 * avg + 1.33237515); -} - -static int +static inline int match_pattern(struct chunker *chunker, size_t chunk_size, uint32_t fp) { if (chunk_size >= BLKSIZE_MAX) @@ -129,6 +123,12 @@ get_chunk_size(struct chunker *chunker) return chunk_size; } +static size_t +calc_discr(size_t avg) +{ + return avg / (-1.42888852e-7 * avg + 1.33237515); +} + struct chunker * alloc_chunker(size_t cap, int fd) {