[sheepdog] [PATCH 04/10] sheep/md: clear performance tips generated by cppcheck
Ruoyu
liangry at ucweb.com
Tue Sep 2 11:14:07 CEST 2014
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 <liangry at 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
More information about the sheepdog
mailing list