From 966cb0dd4ef6fdc79610b147871d39422408e2ee Mon Sep 17 00:00:00 2001 From: ngkaho1234 Date: Sun, 14 Feb 2016 14:53:58 +0000 Subject: [PATCH] ext4_extent: cosmetic fixes on error code handling. Part 2. --- src/ext4_extent.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ext4_extent.c b/src/ext4_extent.c index 3669ba1..b7f9adf 100644 --- a/src/ext4_extent.c +++ b/src/ext4_extent.c @@ -660,7 +660,7 @@ static int ext4_ext_insert_index(struct ext4_inode_ref *inode_ref, err = ext4_ext_dirty(inode_ref, curp); out: - if (!err && set_to_ix) { + if (err == EOK && set_to_ix) { curp->index = ix; curp->p_block = ext4_idx_pblock(ix); } @@ -988,7 +988,7 @@ static int ext4_ext_insert_leaf(struct ext4_inode_ref *inode_ref, err = ext4_ext_dirty(inode_ref, curp); out: - if (!err) { + if (err == EOK) { curp->extent = ex; curp->p_block = ext4_ext_pblock(ex); } @@ -1540,7 +1540,7 @@ static int ext4_ext_convert_to_initialized(struct ext4_inode_ref *inode_ref, err = ext4_ext_split_extent_at(inode_ref, ppath, split + blocks, EXT4_EXT_MARK_UNWRIT1 | EXT4_EXT_MARK_UNWRIT2); - if (!err) { + if (err == EOK) { err = ext4_ext_split_extent_at(inode_ref, ppath, split, EXT4_EXT_MARK_UNWRIT1); }