This patch gets rid of the below message while performing a code
analysis with cppcheck.

[sheep/object_cache.c:805] -> [sheep/object_cache.c:815]: (performance)
Variable 'ret' is reassigned a value before the old one has been used.

Signed-off-by: Ruoyu <lian...@ucweb.com>
---
 sheep/object_cache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sheep/object_cache.c b/sheep/object_cache.c
index edfac6d..967ee43 100644
--- a/sheep/object_cache.c
+++ b/sheep/object_cache.c
@@ -802,7 +802,7 @@ out:
 static int object_cache_pull(struct object_cache *oc, uint64_t idx)
 {
        struct sd_req hdr;
-       int ret = SD_RES_NO_MEM;
+       int ret;
        uint64_t oid = idx_to_oid(oc->vid, idx);
        uint32_t data_length = get_objsize(oid);
        void *buf;
-- 
1.8.3.2


-- 
sheepdog mailing list
sheepdog@lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to