summaryrefslogtreecommitdiffstats
path: root/src/dir.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2012-04-14 11:09:48 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2012-04-14 11:09:48 +0200
commit7d29ee5f1ef40171054886beefe39527f144dbc2 (patch)
tree943858ef36f1bc1602041987cd6b39e7413a190f /src/dir.c
parent35ad901d7b6947e492911b0d5b672530cb645eb9 (diff)
New function td_list_entry_const()
Diffstat (limited to 'src/dir.c')
-rw-r--r--src/dir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dir.c b/src/dir.c
index 3fe8cf1..b46de5f 100644
--- a/src/dir.c
+++ b/src/dir.c
@@ -340,8 +340,8 @@ int dir_whole_partition_log(disk_t *disk, const partition_t *partition, dir_data
int filesort(const struct td_list_head *a, const struct td_list_head *b)
{
- const file_info_t *file_a=td_list_entry(a, file_info_t, list);
- const file_info_t *file_b=td_list_entry(b, file_info_t, list);
+ const file_info_t *file_a=td_list_entry_const(a, const file_info_t, list);
+ const file_info_t *file_b=td_list_entry_const(b, const file_info_t, list);
/* Directories must be listed before files */
const int res=((file_b->stat.st_mode&LINUX_S_IFDIR)-(file_a->stat.st_mode&LINUX_S_IFDIR));
if(res)