From 878dd7543644ca09dd3043713905db1574628619 Mon Sep 17 00:00:00 2001 From: Coly Li Date: Fri, 5 Mar 2010 16:26:36 +0800 Subject: [PATCH 12/15] dx_dirs: fix return value of walk_dirblock() when enable metaecc If there is no error, the return value 'ret' might be used with undefined initial value. This patch fixes the error by initiating it to 0. Reported-by: Vit Pelcak Signed-off-by: Coly Li --- tunefs.ocfs2/feature_metaecc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tunefs.ocfs2/feature_metaecc.c b/tunefs.ocfs2/feature_metaecc.c index c4de8be..799b404 100644 --- a/tunefs.ocfs2/feature_metaecc.c +++ b/tunefs.ocfs2/feature_metaecc.c @@ -135,7 +135,7 @@ static errcode_t walk_dirblock(ocfs2_filesys *fs, struct tunefs_trailer_context *tc, struct tunefs_trailer_dirblock *db) { - errcode_t ret; + errcode_t ret = 0; struct ocfs2_dir_entry *dirent, *prev = NULL; unsigned int real_rec_len; unsigned int offset = 0; -- 1.6.4.2