MCPcopy Create free account
hub / github.com/cgsecurity/testdisk / update_stats

Function update_stats

src/photorec.c:422–448  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

420}
421
422void update_stats(file_stat_t *file_stats, alloc_data_t *list_search_space)
423{
424#ifndef DISABLED_FOR_FRAMAC
425 struct td_list_head *search_walker = NULL;
426 int i;
427 /* Reset */
428 /*@
429 @ loop assigns i, file_stats[i].not_recovered;
430 @*/
431 for(i=0;file_stats[i].file_hint!=NULL;i++)
432 {
433 /*@ assert \valid(file_stats[i]); */
434 file_stats[i].not_recovered=0;
435 }
436 /* Update */
437 td_list_for_each(search_walker, &list_search_space->list)
438 {
439 alloc_data_t *current_search_space;
440 current_search_space=td_list_entry(search_walker, alloc_data_t, list);
441 /*@ assert \valid(current_search_space); */
442 if(current_search_space->file_stat!=NULL)
443 {
444 current_search_space->file_stat->not_recovered++;
445 }
446 }
447#endif
448}
449
450void write_stats_log(const file_stat_t *file_stats)
451{

Callers 2

photorecFunction · 0.85
photorecMethod · 0.85

Calls 1

td_list_for_eachFunction · 0.70

Tested by

no test coverage detected