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

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

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

diff --git a/sheep/md.c b/sheep/md.c
index fdc2ed7..b13d30a 100644
--- a/sheep/md.c
+++ b/sheep/md.c
@@ -392,7 +392,7 @@ struct process_path_arg {
 
 static void *thread_process_path(void *arg)
 {
-       int ret = SD_RES_SUCCESS;
+       int ret;
        struct process_path_arg *parg = (struct process_path_arg *)arg;
 
        ret = for_each_object_in_path(parg->path, parg->func, parg->cleanup,
-- 
1.8.3.2


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

Reply via email to