summaryrefslogtreecommitdiffstats
path: root/src/dirn.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2016-04-10 19:20:53 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2016-04-10 19:20:53 +0200
commit4968f66059e9ca6d8c48b55460a73bfbc72fd1aa (patch)
tree17fea48cbb7ccf9f6eb54a5557e78129e5cfa0a0 /src/dirn.c
parentb5ec147d4663cf73fba8c1fa082aedfda4c09dd4 (diff)
Use TD_INIT_LIST_HEAD() function instead of TD_LIST_HEAD_INIT() static initializer
Diffstat (limited to 'src/dirn.c')
-rw-r--r--src/dirn.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/dirn.c b/src/dirn.c
index 8c3ef37..1bf7f5b 100644
--- a/src/dirn.c
+++ b/src/dirn.c
@@ -604,10 +604,8 @@ static int dir_partition_aux(disk_t *disk, const partition_t *partition, dir_dat
{
const unsigned int current_directory_namelength=strlen(dir_data->current_directory);
long int new_inode=-1; /* Quit */
- file_info_t dir_list = {
- .list = TD_LIST_HEAD_INIT(dir_list.list),
- .name = NULL
- };
+ file_info_t dir_list;
+ TD_INIT_LIST_HEAD(&dir_list.list);
/* Not perfect for FAT32 root cluster */
inode_known[depth]=inode;
dir_data->get_dir(disk, partition, dir_data, inode, &dir_list);
@@ -661,10 +659,8 @@ static int copy_dir(WINDOW *window, disk_t *disk, const partition_t *partition,
{
static unsigned int dir_nbr=0;
static unsigned long int inode_known[MAX_DIR_NBR];
- file_info_t dir_list = {
- .list = TD_LIST_HEAD_INIT(dir_list.list),
- .name = NULL
- };
+ file_info_t dir_list;
+ TD_INIT_LIST_HEAD(&dir_list.list);
const unsigned int current_directory_namelength=strlen(dir_data->current_directory);
char *dir_name;
struct td_list_head *file_walker = NULL;