diff mbox

[2/4] libext2fs: Fix return value in ext2fs_test_block_bitmap_range2()

Message ID 1361807708-15871-3-git-send-email-jack@suse.cz
State Not Applicable, archived
Headers show

Commit Message

Jan Kara Feb. 25, 2013, 3:55 p.m. UTC
We used return without a return value in
ext2fs_test_block_bitmap_range2() despite the fuction returns int.

Signed-off-by: Jan Kara <jack@suse.cz>
---
 lib/ext2fs/gen_bitmap64.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Theodore Ts'o March 1, 2013, 1:06 a.m. UTC | #1
On Mon, Feb 25, 2013 at 05:55:06AM -0000, Jan Kara wrote:
> We used return without a return value in
> ext2fs_test_block_bitmap_range2() despite the fuction returns int.
> 
> Signed-off-by: Jan Kara <jack@suse.cz>

Thanks, this was fixed by commit 0d89e5ace which was submitted by
Philipp Thomas last month.  It's in the maint branch but not yet in a
released version of e2fsprogs yet.,

						- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/lib/ext2fs/gen_bitmap64.c b/lib/ext2fs/gen_bitmap64.c
index 42a97d4..44ac499 100644
--- a/lib/ext2fs/gen_bitmap64.c
+++ b/lib/ext2fs/gen_bitmap64.c
@@ -658,7 +658,7 @@  int ext2fs_test_block_bitmap_range2(ext2fs_block_bitmap bmap,
 	if ((block < bmap->start) || (block+num-1 > bmap->end)) {
 		ext2fs_warn_bitmap(EXT2_ET_BAD_BLOCK_TEST, block,
 				   bmap->description);
-		return;
+		return EINVAL;
 	}
 
 	return bmap->bitmap_ops->test_clear_bmap_extent(bmap, block, num);