summaryrefslogtreecommitdiff
path: root/fs/ext2/ext2fs.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext2/ext2fs.c')
-rw-r--r--fs/ext2/ext2fs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ext2/ext2fs.c b/fs/ext2/ext2fs.c
index 182f0ac..418404e 100644
--- a/fs/ext2/ext2fs.c
+++ b/fs/ext2/ext2fs.c
@@ -440,9 +440,8 @@ int ext2fs_read_file
/* grab middle blocks in one go */
if (i != pos / blocksize && i < blockcnt - 1 && blockcnt > 3) {
int oldblk = blknr;
- int blocknxt;
+ int blocknxt = ext2fs_read_block(node, i + 1);
while (i < blockcnt - 1) {
- blocknxt = ext2fs_read_block(node, i + 1);
if (blocknxt == (oldblk + 1)) {
oldblk = blocknxt;
i++;
@@ -450,6 +449,7 @@ int ext2fs_read_file
blocknxt = ext2fs_read_block(node, i);
break;
}
+ blocknxt = ext2fs_read_block(node, i);
}
if (oldblk == blknr)