lkml.org 
[lkml]   [2014]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] fs: ocfs2: dir.c: Cleaning up uninitialized variables
Date
There is a risk that the variable will be used without being initialized.

This was largely found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
fs/ocfs2/dir.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c
index 0717662..27aa4a1 100644
--- a/fs/ocfs2/dir.c
+++ b/fs/ocfs2/dir.c
@@ -3738,7 +3738,7 @@ static int ocfs2_dx_dir_rebalance(struct ocfs2_super *osb, struct inode *dir,
int credits, ret, i, num_used, did_quota = 0;
u32 cpos, split_hash, insert_hash = hinfo->major_hash;
u64 orig_leaves_start;
- int num_dx_leaves;
+ int num_dx_leaves = 0;
struct buffer_head **orig_dx_leaves = NULL;
struct buffer_head **new_dx_leaves = NULL;
struct ocfs2_alloc_context *data_ac = NULL, *meta_ac = NULL;
--
1.7.10.4


\
 
 \ /
  Last update: 2014-06-01 16:21    [W:0.584 / U:0.800 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site