LCOV - code coverage report
Current view: top level - root/contrail/vrouter/utils/vtest/include - vt_main.h (source / functions) Hit Total Coverage
Test: OpenSDN C/C++ coverage (all TARGET_SET jobs) Lines: 5 5 100.0 %
Date: 2026-11-09 02:10:49 Functions: 1 1 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :  *
       3             :  * Copyright (c) Juniper Networks, Inc. All rights reserved.
       4             :  * Copyright Contributors to the OpenSDN project
       5             :  */
       6             : 
       7             : #ifndef __MAIN_H__
       8             : #define __MAIN_H__
       9             : 
      10             : #include <stdlib.h>
      11             : #include <stdlib.h>
      12             : 
      13             : #define vt_safe_free(ptr) safer_free((void**)&(ptr))
      14             : 
      15             : static void
      16        9443 : safer_free(void **mem) {
      17             : 
      18        9443 :     if (mem && *mem) {
      19        9443 :         free(*mem);
      20        9443 :         *mem = NULL;
      21             :     }
      22             : 
      23        9443 :     return;
      24             : }
      25             : 
      26             : typedef enum {
      27             : 
      28             :     E_MAIN_OK = EXIT_SUCCESS,
      29             :     E_MAIN_CHECK_OK,
      30             :     E_MAIN_TEST_FAIL,
      31             :     E_MAIN_TEST_PASS,
      32             :     E_MAIN_ERR_XML,
      33             :     E_MAIN_ERR_FARG,
      34             :     E_MAIN_ERR,
      35             :     E_MAIN_ERR_ALLOC,
      36             :     E_MAIN_ERR_SOCK,
      37             :     E_MAIN_SKIP
      38             : 
      39             : } VT_MAIN_RET_VAL;
      40             : 
      41             : #endif
      42             : 

Generated by: LCOV version 1.14