PhotoRec: const'ify some code
This commit is contained in:
parent
7ad54ea240
commit
a8295686e4
1 changed files with 3 additions and 3 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue