LCOV - code coverage report
Current view: top level - lib/util - crc32_ieee.c (source / functions) Hit Total Coverage
Test: ut_cov_unit.info Lines: 5 5 100.0 %
Date: 2024-11-05 10:06:02 Functions: 2 2 100.0 %

          Line data    Source code
       1             : /*   SPDX-License-Identifier: BSD-3-Clause
       2             :  *   Copyright (C) 2017 Intel Corporation.
       3             :  *   All rights reserved.
       4             :  */
       5             : 
       6             : #include "util_internal.h"
       7             : #include "spdk/crc32.h"
       8             : 
       9             : static struct spdk_crc32_table g_crc32_ieee_table;
      10             : 
      11             : __attribute__((constructor)) static void
      12           4 : crc32_ieee_init(void)
      13             : {
      14           4 :         crc32_table_init(&g_crc32_ieee_table, SPDK_CRC32_POLYNOMIAL_REFLECT);
      15           4 : }
      16             : 
      17             : uint32_t
      18          15 : spdk_crc32_ieee_update(const void *buf, size_t len, uint32_t crc)
      19             : {
      20          15 :         return crc32_update(&g_crc32_ieee_table, buf, len, crc);
      21             : }

Generated by: LCOV version 1.15