lkml.org 
[lkml]   [2016]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] befs/linuxvfs: remove unneeded initialization
Date
res is initialized to 0 in befs_get_block() but this value will be
overwritten before it is used.

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.org>
---
Hi,

Saw this small issue while reading the code. BeFS is very interesting, and
reading this code is very educational after reading Dominic Giampaolo's book.

Will continue reading and send more fixes if I see any.

Thanks,
Luis

fs/befs/linuxvfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index 7da05b1..2551066 100644
--- a/fs/befs/linuxvfs.c
+++ b/fs/befs/linuxvfs.c
@@ -120,7 +120,7 @@ befs_get_block(struct inode *inode, sector_t block,
struct super_block *sb = inode->i_sb;
befs_data_stream *ds = &BEFS_I(inode)->i_data.ds;
befs_block_run run = BAD_IADDR;
- int res = 0;
+ int res;
ulong disk_off;

befs_debug(sb, "---> befs_get_block() for inode %lu, block %ld",
--
2.5.1
\
 
 \ /
  Last update: 2016-05-28 16:21    [W:0.022 / U:2.844 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site