summaryrefslogtreecommitdiffstats
path: root/src/photorec.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2015-06-24 09:02:09 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2015-06-24 09:02:09 +0200
commit9ed10c72cde9fd8d2e95c2b170224561690c3dbb (patch)
tree285fb01b8ceca70dab2e4f4264c64180365582a3 /src/photorec.c
parent2a1cd7537367f70a6394b3d8b43dd0b9dfbfb1e4 (diff)
use td_list_entry_const() instead of td_list_entry() when variable is defined as const
Diffstat (limited to 'src/photorec.c')
-rw-r--r--src/photorec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/photorec.c b/src/photorec.c
index 3276eaf..3851f56 100644
--- a/src/photorec.c
+++ b/src/photorec.c
@@ -77,7 +77,7 @@ void file_block_log(const file_recovery_t *file_recovery, const unsigned int sec
log_info("%s\t",file_recovery->filename);
td_list_for_each(tmp, &file_recovery->location.list)
{
- const alloc_list_t *element=td_list_entry(tmp, alloc_list_t, list);
+ const alloc_list_t *element=td_list_entry_const(tmp, const alloc_list_t, list);
if(element->data>0)
log_info(" %lu-%lu", (unsigned long)(element->start/sector_size), (unsigned long)(element->end/sector_size));
else
@@ -457,7 +457,7 @@ unsigned int find_blocksize(alloc_data_t *list_search_space, const unsigned int
run_again=0;
td_list_for_each(search_walker, &list_search_space->list)
{
- const alloc_data_t *tmp=td_list_entry(search_walker, alloc_data_t, list);
+ const alloc_data_t *tmp=td_list_entry_const(search_walker, const alloc_data_t, list);
if(tmp->file_stat!=NULL)
{
if(tmp->start%blocksize!=*offset && blocksize>default_blocksize)