Coverage Report

Created: 2023-03-26 06:54

/src/util-linux/include/env.h
Line
Count
Source (jump to first uncovered line)
1
#ifndef UTIL_LINUX_ENV_H
2
#define UTIL_LINUX_ENV_H
3
4
#include "c.h"
5
#include "nls.h"
6
7
struct ul_env_list;
8
9
extern void sanitize_env(void);
10
extern void __sanitize_env(struct ul_env_list **org);
11
12
extern int env_list_setenv(struct ul_env_list *ls);
13
extern void env_list_free(struct ul_env_list *ls);
14
extern struct ul_env_list *env_from_fd(int pid);
15
16
extern char *safe_getenv(const char *arg);
17
18
19
#ifndef XSETENV_EXIT_CODE
20
# define XSETENV_EXIT_CODE EXIT_FAILURE
21
#endif
22
23
static inline void xsetenv(char const *name, char const *val, int overwrite)
24
0
{
25
0
  if (setenv(name, val, overwrite) != 0)
26
0
    err(XSETENV_EXIT_CODE, _("failed to set the %s environment variable"), name);
27
0
}
Unexecuted instantiation: utils.c:xsetenv
Unexecuted instantiation: env.c:xsetenv
Unexecuted instantiation: cache.c:xsetenv
Unexecuted instantiation: config.c:xsetenv
28
29
static inline int remote_entry(char **argv, int remove, int last)
30
0
{
31
0
  memmove(argv + remove, argv + remove + 1, sizeof(char *) * (last - remove));
32
0
  return last - 1;
33
0
}
Unexecuted instantiation: utils.c:remote_entry
Unexecuted instantiation: env.c:remote_entry
Unexecuted instantiation: cache.c:remote_entry
Unexecuted instantiation: config.c:remote_entry
34
35
#endif /* UTIL_LINUX_ENV_H */