LCOV - code coverage report
Current view: top level - src - status_of_changes.c (source / functions) Coverage Total Hit
Test: coverage.info Lines: 100.0 % 9 9
Test Date: 2026-03-01 04:31:48 Functions: 100.0 % 1 1
Branches: 87.5 % 8 7

             Branch data     Line data    Source code
       1                 :             : #include "precizer.h"
       2                 :             : 
       3                 :             : /**
       4                 :             :  *
       5                 :             :  * Reflect global change status against database
       6                 :             :  *
       7                 :             :  */
       8                 :         283 : Return status_of_changes(void)
       9                 :             : {
      10                 :             :         /* Status returned by this function through provide()
      11                 :             :            Default value assumes successful completion */
      12                 :         283 :         Return status = SUCCESS;
      13                 :             : 
      14   [ +  +  +  - ]:         283 :         if(config->compare != true && global_interrupt_flag == false)
      15                 :             :         {
      16         [ +  + ]:         213 :                 if(config->db_primary_file_exists == true)
      17                 :             :                 {
      18                 :          92 :                         status = db_check_changes();
      19                 :             : 
      20                 :             :                 } else {
      21         [ +  + ]:         121 :                         if(config->db_primary_file_modified == false)
      22                 :             :                         {
      23                 :           6 :                                 slog(EVERY,BOLD "Nothing has changed in the primary database since the program was launched (no files were added, updated, or deleted)" RESET "\n");
      24                 :             :                         } else {
      25                 :         115 :                                 slog(EVERY,BOLD "The brand-new primary database file %s was created and modified since the program started (files were added, removed, or updated)" RESET "\n",confstr(db_file_name));
      26                 :             :                         }
      27                 :             :                 }
      28                 :             :         }
      29                 :             : 
      30                 :         283 :         provide(status);
      31                 :             : }
        

Generated by: LCOV version 2.0-1