[Ocfs2-tools-devel] [PATCH] libo2cb: code clean up in o2cb_list_dir()

Coly Li coly.li at suse.de
Sun Feb 8 11:57:53 PST 2009


This patch cleans up duplicated code in o2cb_list_dir().

Signed-off-by: Coly Li <coly.li at suse.de>
---
 libo2cb/o2cb_abi.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/libo2cb/o2cb_abi.c b/libo2cb/o2cb_abi.c
index 7ebfa72..41f6344 100644
--- a/libo2cb/o2cb_abi.c
+++ b/libo2cb/o2cb_abi.c
@@ -1785,8 +1785,6 @@ static errcode_t o2cb_list_dir(char *path, char ***objs)
 	if (!*objs)
 		goto out_free_list;

-	tmp = list;
-	count = 0;
 	for (tmp = list, count = 0; tmp; tmp = tmp->next, count++) {
 		(*objs)[count] = tmp->name;
 		tmp->name = NULL;

-- 
Coly Li
SuSE Labs



More information about the Ocfs2-tools-devel mailing list