summaryrefslogtreecommitdiffstats
path: root/src/filegen.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2010-10-31 17:14:22 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2010-10-31 17:14:22 +0100
commit173e66e1bc9e04d171097eb57d42692fd4440126 (patch)
tree0f6d13deadc45a0bf60a8a6aaf4a1e3bc6c955d2 /src/filegen.c
parent1fe68dd2b4eb2acca20132e52da6212360c84211 (diff)
PhotoRec: remove has_value field in file_check_list_t
Diffstat (limited to 'src/filegen.c')
-rw-r--r--src/filegen.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/filegen.c b/src/filegen.c
index ee6d7be..8557e71 100644
--- a/src/filegen.c
+++ b/src/filegen.c
@@ -66,7 +66,6 @@ static void file_check_add_tail(file_check_t *file_check_new, file_check_list_t
unsigned int i;
file_check_list_t *newe=(file_check_list_t *)MALLOC(sizeof(*newe));
newe->offset=file_check_new->offset;
- newe->has_value=(file_check_new->length==0?0:1);
for(i=0;i<256;i++)
{
newe->file_checks[i].list.prev=&newe->file_checks[i].list;
@@ -96,7 +95,7 @@ static void index_header_check_aux(file_check_t *file_check_new)
td_list_for_each(tmp, &file_check_list.list)
{
file_check_list_t *pos=td_list_entry(tmp, file_check_list_t, list);
- if(file_check_new->length>0 && pos->has_value==1)
+ if(file_check_new->length>0)
{
if(pos->offset >= file_check_new->offset &&
pos->offset < file_check_new->offset+file_check_new->length)
@@ -112,13 +111,6 @@ static void index_header_check_aux(file_check_t *file_check_new)
return ;
}
}
- else if(file_check_new->length==0 && pos->has_value==0)
- {
- td_list_add_sorted(&file_check_new->list,
- &pos->file_checks[0].list,
- file_check_cmp);
- return;
- }
}
file_check_add_tail(file_check_new, &file_check_list);
}