tUnify conditionals - dedup - deduplicating backup program
(HTM) git clone git://git.z3bra.org/dedup.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 4d6d7d91c1672bd867c6dc1242e2dd2258698df9
(DIR) parent 85170f6b38620fddbf8b08b13a3b293f4db62d3e
(HTM) Author: sin <sin@2f30.org>
Date: Tue, 5 Mar 2019 11:17:37 +0000
Unify conditionals
Diffstat:
M dedup.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
---
(DIR) diff --git a/dedup.c b/dedup.c
t@@ -414,15 +414,11 @@ check_cache_entry(struct snapshot *snap, void *arg)
blk_desc = &snap->blk_desc[i];
memcpy(&cache_entry.md, blk_desc->md, sizeof(cache_entry.md));
- if (lookup_cache_entry(cache, &cache_entry) < 0) {
+ if (lookup_cache_entry(cache, &cache_entry) < 0 ||
+ cache_entry.offset != blk_desc->offset ||
+ cache_entry.size != blk_desc->size) {
*ret = -1;
return WALK_STOP;
- } else {
- if (cache_entry.offset != blk_desc->offset ||
- cache_entry.size != blk_desc->size) {
- *ret = -1;
- return WALK_STOP;
- }
}
}
return WALK_CONTINUE;