diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2021-07-13 16:15:35 -0700 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2021-07-13 16:15:35 -0700 |
commit | 1bc76585d5cb1dadcd6b84c18d4ea911ab0e12e7 (patch) | |
tree | b537e28885df85d305f02c0671e6d3a36388428e | |
parent | 69952e3e23020bbf5f225367bc0dcbcf8504d71a (diff) | |
download | f2fs-tools-1bc76585d5cb1dadcd6b84c18d4ea911ab0e12e7.tar.gz |
dump.f2fs: minor clean ups
This patch cleans up, pointed by Chao.
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r-- | fsck/dump.c | 3 | ||||
-rw-r--r-- | fsck/fsck.c | 1 |
2 files changed, 2 insertions, 2 deletions
diff --git a/fsck/dump.c b/fsck/dump.c index 67e94ed..fce86c9 100644 --- a/fsck/dump.c +++ b/fsck/dump.c @@ -256,8 +256,7 @@ static void dump_data_blk(struct f2fs_sb_info *sbi, __u64 offset, u32 blkaddr) ASSERT(blkaddr == NULL_ADDR); return; } - if (blkaddr == NULL_ADDR || blkaddr == NEW_ADDR || - blkaddr == COMPRESS_ADDR) { + if (!is_valid_data_blkaddr(blkaddr)) { print_extent(false); dump_extent.blk = 0; dump_extent.len = 1; diff --git a/fsck/fsck.c b/fsck/fsck.c index 6ca85f0..279b2c4 100644 --- a/fsck/fsck.c +++ b/fsck/fsck.c @@ -1722,6 +1722,7 @@ int fsck_chk_dentry_blk(struct f2fs_sb_info *sbi, int casefolded, u32 blk_addr, fsck->dentry_depth++; new_dentry = calloc(sizeof(struct f2fs_dentry), 1); + ASSERT(new_dentry != NULL); new_dentry->depth = fsck->dentry_depth; memcpy(new_dentry->name, child->p_name, F2FS_NAME_LEN); cur_dentry->next = new_dentry; |