We should remove sizeof operator for SHA1_DIGEST_SIZE.
Signed-off-by: Bingpeng Zhu <[email protected]>
---
sheep/recovery.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/sheep/recovery.c b/sheep/recovery.c
index 7e724c9..12a293a 100644
--- a/sheep/recovery.c
+++ b/sheep/recovery.c
@@ -274,8 +274,7 @@ static int recover_object_from(struct recovery_obj_work
*row,
if (ret != SD_RES_SUCCESS)
return ret;
- if (memcmp(rsp->hash.digest, sha1,
- sizeof(SHA1_DIGEST_SIZE)) == 0) {
+ if (memcmp(rsp->hash.digest, sha1, SHA1_DIGEST_SIZE) == 0) {
sd_debug("use local replica at epoch %d", local_epoch);
ret = sd_store->link(oid, local_epoch);
if (ret == SD_RES_SUCCESS)
--
1.7.1
--
sheepdog mailing list
[email protected]
https://lists.wpkg.org/mailman/listinfo/sheepdog