From: Bingpeng Zhu <[email protected]>

We should remove sizeof operator for SHA1_DIGEST_SIZE.

Signed-off-by: Bingpeng Zhu <[email protected]>
Signed-off-by: Hitoshi Mitake <[email protected]>
---
 sheep/recovery.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sheep/recovery.c b/sheep/recovery.c
index 7874fc9..f280dbd 100644
--- a/sheep/recovery.c
+++ b/sheep/recovery.c
@@ -275,8 +275,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.9.1

-- 
sheepdog mailing list
[email protected]
https://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to