summaryrefslogtreecommitdiffstats
path: root/src/phbf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/phbf.c')
-rw-r--r--src/phbf.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/phbf.c b/src/phbf.c
index 1165557..5d501a3 100644
--- a/src/phbf.c
+++ b/src/phbf.c
@@ -590,15 +590,17 @@ static bf_status_t photorec_bf_frag(struct ph_param *params, file_recovery_t *fi
extrablock_offset=0;
if(!td_list_empty(&file_recovery->location.list))
{
- const alloc_list_t *element=td_list_entry_const(file_recovery->location.list.prev, const alloc_list_t, list);
+ const alloc_list_t *element=td_list_last_entry(&file_recovery->location.list, alloc_list_t, list);
extrablock_offset=element->end/blocksize*blocksize;
}
/* Get the corresponding search_place */
- extractblock_search_space=td_list_entry(list_search_space->list.next, alloc_data_t, list);
+ extractblock_search_space=td_list_first_entry(&list_search_space->list, alloc_data_t, list);
while(extractblock_search_space != list_search_space &&
!(extractblock_search_space->start <= extrablock_offset &&
extrablock_offset <= extractblock_search_space->end))
- extractblock_search_space=td_list_entry(extractblock_search_space->list.next, alloc_data_t, list);
+ {
+ extractblock_search_space=td_list_next_entry(extractblock_search_space, list);
+ }
/* Update extractblock_search_space & extrablock_offset */
get_next_sector(list_search_space, &extractblock_search_space, &extrablock_offset, blocksize);
/* */