Coverage Report

Created: 2023-05-19 06:16

/src/ntp-dev/libntp/lib_strbuf.c
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * lib_strbuf - library string storage
3
 */
4
#ifdef HAVE_CONFIG_H
5
#include <config.h>
6
#endif
7
8
#include <isc/net.h>
9
#include <isc/result.h>
10
11
#include "ntp_fp.h"
12
#include "ntp_stdlib.h"
13
#include "lib_strbuf.h"
14
15
16
/*
17
 * Storage declarations
18
 */
19
int   debug;
20
libbufstr lib_stringbuf[LIB_NUMBUF];
21
int   lib_nextbuf;
22
int   ipv4_works;
23
int   ipv6_works;
24
int   lib_inited;
25
26
27
/*
28
 * initialization routine.  Might be needed if the code is ROMized.
29
 */
30
void
31
init_lib(void)
32
1
{
33
1
  if (lib_inited)
34
0
    return;
35
1
  ipv4_works = (ISC_R_SUCCESS == isc_net_probeipv4());
36
1
  ipv6_works = (ISC_R_SUCCESS == isc_net_probeipv6());
37
1
  init_systime();
38
1
  lib_inited = TRUE;
39
1
}