summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2012-05-18 21:14:27 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2012-05-18 21:14:27 +0200
commita8295686e423bc5218561d92ab9d1fcfa8e913e8 (patch)
tree0eeda2a4e8924c84428085d8235323c2098618b4 /src
parent7ad54ea24079a700b6372884fa6d3fee9fd14fdd (diff)
PhotoRec: const'ify some code
Diffstat (limited to 'src')
-rw-r--r--src/phbs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/phbs.c b/src/phbs.c
index 7b5d32d..b12a8ad 100644
--- a/src/phbs.c
+++ b/src/phbs.c
@@ -137,11 +137,11 @@ int photorec_find_blocksize(struct ph_param *params, const struct ph_options *op
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, 1, &file_recovery, &file_recovery_new)!=0)
{