summaryrefslogtreecommitdiffstats
path: root/src/phbf.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2012-06-27 08:57:08 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2012-06-27 08:57:08 +0200
commitd13ed4ece6c132ce077bc70c9158566f5156bbb3 (patch)
tree859a30cf784ecd113b2260c5cf917601278d5566 /src/phbf.c
parent9fcfd1910fe016af76b66178d8004816aebb4ec8 (diff)
phbf.c, phbs.c: constify some variables
Diffstat (limited to 'src/phbf.c')
-rw-r--r--src/phbf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/phbf.c b/src/phbf.c
index b68c37c..3180a9f 100644
--- a/src/phbf.c
+++ b/src/phbf.c
@@ -190,17 +190,17 @@ int photorec_bf(struct ph_param *params, const struct ph_options *options, alloc
need_to_check_file=0;
if(offset==current_search_space->start)
{
- struct td_list_head *tmpl;
+ const struct td_list_head *tmpl;
file_recovery_t file_recovery_new;
file_recovery_new.blocksize=blocksize;
file_recovery_new.file_stat=NULL;
td_list_for_each(tmpl, &file_check_list.list)
{
- struct td_list_head *tmp;
- const file_check_list_t *pos=td_list_entry(tmpl, file_check_list_t, list);
+ const struct td_list_head *tmp;
+ const file_check_list_t *pos=td_list_entry_const(tmpl, const file_check_list_t, list);
td_list_for_each(tmp, &pos->file_checks[buffer[pos->offset]].list)
{
- const file_check_t *file_check=td_list_entry(tmp, file_check_t, list);
+ const file_check_t *file_check=td_list_entry_const(tmp, const file_check_t, list);
if((file_check->length==0 || memcmp(buffer + file_check->offset, file_check->value, file_check->length)==0) &&
file_check->header_check(buffer, read_size, 0, &file_recovery, &file_recovery_new)!=0)
{