summaryrefslogtreecommitdiffstats
path: root/src/photorec.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2020-06-19 18:13:01 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2020-06-19 19:02:41 +0200
commit60b5424f53c3d8606b6d04f32340d6533d6c358f (patch)
tree897e765e9527bba5b03ca0f69b837b4ed8b50835 /src/photorec.c
parent49cd8dbd9dcc04893c491f14672911e0a7dac824 (diff)
Constify a lot of function parameters
Diffstat (limited to 'src/photorec.c')
-rw-r--r--src/photorec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/photorec.c b/src/photorec.c
index bc0cb95..b946d9b 100644
--- a/src/photorec.c
+++ b/src/photorec.c
@@ -290,7 +290,7 @@ unsigned int photorec_mkdir(const char *recup_dir, const unsigned int initial_di
return dir_num;
}
-int get_prev_file_header(alloc_data_t *list_search_space, alloc_data_t **current_search_space, uint64_t *offset)
+int get_prev_file_header(const alloc_data_t *list_search_space, alloc_data_t **current_search_space, uint64_t *offset)
{
int nbr;
alloc_data_t *file_space=*current_search_space;
@@ -313,7 +313,7 @@ int get_prev_file_header(alloc_data_t *list_search_space, alloc_data_t **current
return -1;
}
-void forget(alloc_data_t *list_search_space, alloc_data_t *current_search_space)
+void forget(const alloc_data_t *list_search_space, alloc_data_t *current_search_space)
{
struct td_list_head *search_walker = NULL;
struct td_list_head *prev= NULL;
@@ -938,6 +938,8 @@ static inline void file_block_remove_from_sp(alloc_data_t *list_search_space, al
}
}
log_critical("file_block_remove_from_sp(list_search_space, alloc_data_t **new_current_search_space, uint64_t *offset, const unsigned int blocksize) failed\n");
+ log_flush();
+ exit(1);
}
static inline void file_block_add_to_file(alloc_list_t *list, const uint64_t offset, const uint64_t blocksize, const unsigned int data)