Skip to content

Commit

Permalink
[component/fs/romfs] minor tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
versaloon committed Aug 8, 2023
1 parent 62e389c commit 3c53b2c
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions source/component/fs/driver/romfs/vsf_romfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,10 @@ static bool __vsf_romfs_should_hide(vk_romfs_header_t *image_head, vk_romfs_head
vk_romfs_header_t *header;
while (image_head != image_cur) {
header = __vsf_romfs_lookup_in_image(image_head, dir);
image_head = (vk_romfs_header_t *)((uint8_t *)image_head + be32_to_cpu(image_head->size));
if (NULL == header) {
continue;
}

if (__vsf_romfs_lookup_in_dir(image_head, header, name) != NULL) {
if ((header != NULL) && (__vsf_romfs_lookup_in_dir(image_head, header, name) != NULL)) {
return true;
}
image_head = (vk_romfs_header_t *)((uint8_t *)image_head + be32_to_cpu(image_head->size));
}
return false;
}
Expand Down Expand Up @@ -276,13 +272,10 @@ __vsf_component_peda_ifs_entry(__vk_romfs_lookup, vk_file_lookup)

if (!dir->level) {
header = image + 1;
} else {
header = __vsf_romfs_lookup_in_image(image, dir);
if (header != NULL) {
header++;
}
} else if ((header = __vsf_romfs_lookup_in_image(image, dir)) != NULL) {
header++;
}
if(header != NULL) {
if (header != NULL) {
goto lookup_next_image;
}
}
Expand Down

0 comments on commit 3c53b2c

Please sign in to comment.