LCOV - code coverage report
Current view: top level - vnsw/agent/services/multicast/agent_map - task_block_api.cc (source / functions) Hit Total Coverage
Test: OpenSDN C/C++ coverage (all TARGET_SET jobs) Lines: 10 11 90.9 %
Date: 2026-08-03 02:19:58 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :  * Copyright (c) 2017 Juniper Networks, Inc. All rights reserved.
       3             :  */
       4             : 
       5             : #include <string.h>
       6             : #ifdef __cplusplus
       7             : extern "C" {
       8             : #endif
       9             : #include "task_block_api.h"
      10             : #ifdef __cplusplus
      11             : }
      12             : #endif
      13             : 
      14        3375 : block_t task_block_init(size_t size, const char *name)
      15             : {
      16        3375 :     return (block_t)size;
      17             : }
      18             : 
      19        8561 : void *task_block_alloc(block_t block)
      20             : {
      21        8561 :     void *memory = malloc((size_t)block);
      22        8561 :     if (!memory) {
      23           0 :         return NULL;
      24             :     }
      25             : 
      26        8561 :     memset(memory, 0x00, block);
      27             : 
      28        8561 :     return memory;
      29             : }
      30             : 
      31        8561 : void task_block_free(block_t block, void *mem)
      32             : {
      33        8561 :     free(mem);
      34        8561 : }
      35             : 

Generated by: LCOV version 1.14