mirror of
https://github.com/sgmarz/osblog.git
synced 2024-11-23 18:06:20 +04:00
Remove redundant variable
This commit is contained in:
parent
bb4e2d118a
commit
3eb61ad188
@ -167,7 +167,7 @@ impl FileSystem for MinixFileSystem {
|
||||
let mut blocks_seen = 0u32;
|
||||
let offset_block = offset / BLOCK_SIZE;
|
||||
let mut offset_byte = offset % BLOCK_SIZE;
|
||||
|
||||
let num_indirect_pointers = BLOCK_SIZE as usize / 4;
|
||||
let inode_result = Self::get_inode(desc, desc.node);
|
||||
if inode_result.is_none() {
|
||||
// The inode couldn't be read, for some reason.
|
||||
@ -238,7 +238,6 @@ impl FileSystem for MinixFileSystem {
|
||||
if inode.zones[7] != 0 {
|
||||
let mut indirect_buffer = BlockBuffer::new(BLOCK_SIZE);
|
||||
syc_read(desc, indirect_buffer.get_mut(), BLOCK_SIZE, BLOCK_SIZE * inode.zones[7]);
|
||||
let num_indirect_pointers = BLOCK_SIZE as usize / 4;
|
||||
let izones = indirect_buffer.get() as *const u32;
|
||||
for i in 0..num_indirect_pointers {
|
||||
unsafe {
|
||||
@ -271,7 +270,6 @@ impl FileSystem for MinixFileSystem {
|
||||
let mut indirect_buffer = BlockBuffer::new(BLOCK_SIZE);
|
||||
let mut iindirect_buffer = BlockBuffer::new(BLOCK_SIZE);
|
||||
syc_read(desc, indirect_buffer.get_mut(), BLOCK_SIZE, BLOCK_SIZE * inode.zones[8]);
|
||||
let num_indirect_pointers = BLOCK_SIZE as usize / 4;
|
||||
let izones = indirect_buffer.get() as *const u32;
|
||||
let iizones = iindirect_buffer.get() as *const u32;
|
||||
unsafe {
|
||||
@ -315,7 +313,6 @@ impl FileSystem for MinixFileSystem {
|
||||
let mut iindirect_buffer = BlockBuffer::new(BLOCK_SIZE);
|
||||
let mut iiindirect_buffer = BlockBuffer::new(BLOCK_SIZE);
|
||||
syc_read(desc, indirect_buffer.get_mut(), BLOCK_SIZE, BLOCK_SIZE * inode.zones[9]);
|
||||
let num_indirect_pointers = BLOCK_SIZE as usize / 4;
|
||||
let izones = indirect_buffer.get() as *const u32;
|
||||
let iizones = iindirect_buffer.get() as *const u32;
|
||||
let iiizones = iiindirect_buffer.get() as *const u32;
|
||||
|
Loading…
Reference in New Issue
Block a user