dedup

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

commit 9525ea212a386cd1d65b9867948109ed80e7dd7d
parent 88a8835e3138a285503a2a93454daa1220caa490
Author: sin <sin@2f30.org>
Date:   Sun,  5 May 2019 20:29:06 +0100

Fix style

Diffstat:
Mbstorage.c | 12++++--------
1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/bstorage.c b/bstorage.c @@ -582,9 +582,8 @@ bsget(struct bctx *bctx, unsigned char *md, void *buf, size_t *n) struct sctx *sctx; struct bd key, *bd; - sctx = bctx->sctx; - /* Lookup block in the cache */ + sctx = bctx->sctx; memcpy(key.md, md, MDSIZE); bd = RB_FIND(bdcache, &sctx->bdcache, &key); if (bd == NULL) { @@ -617,9 +616,8 @@ bsrm(struct bctx *bctx, unsigned char *md) struct bd key, *bd; off_t bdoffs; - sctx = bctx->sctx; - /* Lookup block in the cache */ + sctx = bctx->sctx; memcpy(key.md, md, MDSIZE); bd = RB_FIND(bdcache, &sctx->bdcache, &key); if (bd == NULL) { @@ -698,9 +696,8 @@ bscheck(struct bctx *bctx, unsigned char *md) struct bd key, *bd; void *buf; - sctx = bctx->sctx; - /* Lookup block in the cache */ + sctx = bctx->sctx; memcpy(key.md, md, MDSIZE); bd = RB_FIND(bdcache, &sctx->bdcache, &key); if (bd == NULL) { @@ -771,9 +768,8 @@ bsclose(struct bctx *bctx) struct bd *bd, *tmp; int r; - sctx = bctx->sctx; - /* Free block descriptor cache */ + sctx = bctx->sctx; RB_FOREACH_SAFE(bd, bdcache, &sctx->bdcache, tmp) { RB_REMOVE(bdcache, &sctx->bdcache, bd); free(bd);