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

[dog/vdi.c:972] -> [dog/vdi.c:974]: (performance) Variable 'ret' is
reassigned a value before the old one has been used.

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

diff --git a/dog/vdi.c b/dog/vdi.c
index 49fc62b..53c75f6 100644
--- a/dog/vdi.c
+++ b/dog/vdi.c
@@ -969,7 +969,7 @@ static int vdi_object_map(int argc, char **argv)
        uint64_t idx = vdi_cmd_data.index;
        struct sd_inode *inode = xmalloc(sizeof(*inode));
        uint32_t vid;
-       int ret = EXIT_SUCCESS;
+       int ret;
 
        ret = read_vdi_obj(vdiname, vdi_cmd_data.snapshot_id,
                           vdi_cmd_data.snapshot_tag, NULL, inode,
-- 
1.8.3.2


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

Reply via email to