LCOV - code coverage report
Current view: top level - vlib/stats - format.c (source / functions) Hit Total Coverage
Test: coverage-filtered.info Lines: 7 7 100.0 %
Date: 2023-10-26 01:39:38 Functions: 1 1 100.0 %

          Line data    Source code
       1             : /* SPDX-License-Identifier: Apache-2.0
       2             :  * Copyright(c) 2022 Cisco Systems, Inc.
       3             :  */
       4             : 
       5             : #include <vlib/vlib.h>
       6             : #include <vlib/unix/unix.h>
       7             : #include <vlib/stats/stats.h>
       8             : 
       9             : u8 *
      10      131335 : format_vlib_stats_symlink (u8 *s, va_list *args)
      11             : {
      12      131335 :   u8 *input = va_arg (*args, u8 *);
      13             : 
      14     1391620 :   for (int i = 0; i < vec_len (input); i++)
      15     1260290 :     if (input[i] == '/')
      16         510 :       vec_add1 (s, '_');
      17             :     else
      18     1259780 :       vec_add1 (s, input[i]);
      19             : 
      20      131335 :   return s;
      21             : }

Generated by: LCOV version 1.14