2022-07-04 07:07:54

by Ritesh Harjani

[permalink] [raw]
Subject: [RFC 02/13] badblocks: Remove unused badblocks_flags

badblocks_flags is not used anywhere. So just remove it.

Signed-off-by: Ritesh Harjani <[email protected]>
---
lib/ext2fs/badblocks.c | 6 +-----
lib/ext2fs/ext2fsP.h | 1 -
2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/lib/ext2fs/badblocks.c b/lib/ext2fs/badblocks.c
index 0f23983b..0570b131 100644
--- a/lib/ext2fs/badblocks.c
+++ b/lib/ext2fs/badblocks.c
@@ -81,11 +81,7 @@ errcode_t ext2fs_u32_copy(ext2_u32_list src, ext2_u32_list *dest)
{
errcode_t retval;

- retval = make_u32_list(src->size, src->num, src->list, dest);
- if (retval)
- return retval;
- (*dest)->badblocks_flags = src->badblocks_flags;
- return 0;
+ return make_u32_list(src->size, src->num, src->list, dest);
}

errcode_t ext2fs_badblocks_copy(ext2_badblocks_list src,
diff --git a/lib/ext2fs/ext2fsP.h b/lib/ext2fs/ext2fsP.h
index a20a0502..d2045af8 100644
--- a/lib/ext2fs/ext2fsP.h
+++ b/lib/ext2fs/ext2fsP.h
@@ -34,7 +34,6 @@ struct ext2_struct_u32_list {
int num;
int size;
__u32 *list;
- int badblocks_flags;
};

struct ext2_struct_u32_iterate {
--
2.35.3