iFix style - dedup - deduplicating backup program Err bitreich.org 70 hgit clone git://bitreich.org/dedup/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/dedup/ URL:git://bitreich.org/dedup/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/dedup/ bitreich.org 70 1Log /scm/dedup/log.gph bitreich.org 70 1Files /scm/dedup/files.gph bitreich.org 70 1Refs /scm/dedup/refs.gph bitreich.org 70 1Tags /scm/dedup/tag bitreich.org 70 1README /scm/dedup/file/README.gph bitreich.org 70 1LICENSE /scm/dedup/file/LICENSE.gph bitreich.org 70 i--- Err bitreich.org 70 1commit 9525ea212a386cd1d65b9867948109ed80e7dd7d /scm/dedup/commit/9525ea212a386cd1d65b9867948109ed80e7dd7d.gph bitreich.org 70 1parent 88a8835e3138a285503a2a93454daa1220caa490 /scm/dedup/commit/88a8835e3138a285503a2a93454daa1220caa490.gph bitreich.org 70 hAuthor: sin URL:mailto:sin@2f30.org bitreich.org 70 iDate: Sun, 5 May 2019 20:29:06 +0100 Err bitreich.org 70 i Err bitreich.org 70 iFix style Err bitreich.org 70 i Err bitreich.org 70 iDiffstat: Err bitreich.org 70 i M bstorage.c | 12 ++++-------- Err bitreich.org 70 i Err bitreich.org 70 i1 file changed, 4 insertions(+), 8 deletions(-) Err bitreich.org 70 i--- Err bitreich.org 70 1diff --git a/bstorage.c b/bstorage.c /scm/dedup/file/bstorage.c.gph bitreich.org 70 i@@ -582,9 +582,8 @@ bsget(struct bctx *bctx, unsigned char *md, void *buf, size_t *n) Err bitreich.org 70 i struct sctx *sctx; Err bitreich.org 70 i struct bd key, *bd; Err bitreich.org 70 i Err bitreich.org 70 i- sctx = bctx->sctx; Err bitreich.org 70 i- Err bitreich.org 70 i /* Lookup block in the cache */ Err bitreich.org 70 i+ sctx = bctx->sctx; Err bitreich.org 70 i memcpy(key.md, md, MDSIZE); Err bitreich.org 70 i bd = RB_FIND(bdcache, &sctx->bdcache, &key); Err bitreich.org 70 i if (bd == NULL) { Err bitreich.org 70 i@@ -617,9 +616,8 @@ bsrm(struct bctx *bctx, unsigned char *md) Err bitreich.org 70 i struct bd key, *bd; Err bitreich.org 70 i off_t bdoffs; Err bitreich.org 70 i Err bitreich.org 70 i- sctx = bctx->sctx; Err bitreich.org 70 i- Err bitreich.org 70 i /* Lookup block in the cache */ Err bitreich.org 70 i+ sctx = bctx->sctx; Err bitreich.org 70 i memcpy(key.md, md, MDSIZE); Err bitreich.org 70 i bd = RB_FIND(bdcache, &sctx->bdcache, &key); Err bitreich.org 70 i if (bd == NULL) { Err bitreich.org 70 i@@ -698,9 +696,8 @@ bscheck(struct bctx *bctx, unsigned char *md) Err bitreich.org 70 i struct bd key, *bd; Err bitreich.org 70 i void *buf; Err bitreich.org 70 i Err bitreich.org 70 i- sctx = bctx->sctx; Err bitreich.org 70 i- Err bitreich.org 70 i /* Lookup block in the cache */ Err bitreich.org 70 i+ sctx = bctx->sctx; Err bitreich.org 70 i memcpy(key.md, md, MDSIZE); Err bitreich.org 70 i bd = RB_FIND(bdcache, &sctx->bdcache, &key); Err bitreich.org 70 i if (bd == NULL) { Err bitreich.org 70 i@@ -771,9 +768,8 @@ bsclose(struct bctx *bctx) Err bitreich.org 70 i struct bd *bd, *tmp; Err bitreich.org 70 i int r; Err bitreich.org 70 i Err bitreich.org 70 i- sctx = bctx->sctx; Err bitreich.org 70 i- Err bitreich.org 70 i /* Free block descriptor cache */ Err bitreich.org 70 i+ sctx = bctx->sctx; Err bitreich.org 70 i RB_FOREACH_SAFE(bd, bdcache, &sctx->bdcache, tmp) { Err bitreich.org 70 i RB_REMOVE(bdcache, &sctx->bdcache, bd); Err bitreich.org 70 i free(bd); Err bitreich.org 70 .