summaryrefslogtreecommitdiffstats
path: root/src/fidentify.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/fidentify.c
parent2a1cd7537367f70a6394b3d8b43dd0b9dfbfb1e4 (diff)
use td_list_entry_const() instead of td_list_entry() when variable is defined as const
Diffstat (limited to 'src/fidentify.c')
-rw-r--r--src/fidentify.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fidentify.c b/src/fidentify.c
index a28712d..2a07334 100644
--- a/src/fidentify.c
+++ b/src/fidentify.c
@@ -98,10 +98,10 @@ static int file_identify(const char *filename, const unsigned int check)
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 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)
{