• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

systemd / systemd / 15232239991

24 May 2025 08:01PM UTC coverage: 72.053% (-0.02%) from 72.07%
15232239991

push

github

web-flow
docs: add man pages for sd_device_enumerator_[new,ref,unref,unrefp] (#37586)

For #20929.

299160 of 415197 relevant lines covered (72.05%)

703671.29 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

78.57
/src/shared/web-util.c
1
/* SPDX-License-Identifier: LGPL-2.1-or-later */
2

3
#include "string-util.h"
4
#include "strv.h"
5
#include "utf8.h"
6
#include "web-util.h"
7

8
bool http_etag_is_valid(const char *etag) {
×
9
        if (isempty(etag))
×
10
                return false;
11

12
        if (!endswith(etag, "\""))
×
13
                return false;
14

15
        if (!STARTSWITH_SET(etag, "\"", "W/\""))
×
16
                return false;
×
17

18
        return true;
×
19
}
20

21
bool http_url_is_valid(const char *url) {
41,625✔
22
        const char *p;
41,625✔
23

24
        if (isempty(url))
41,625✔
25
                return false;
41,625✔
26

27
        p = STARTSWITH_SET(url, "http://", "https://");
41,625✔
28
        if (!p)
41,625✔
29
                return false;
30

31
        if (isempty(p))
4,531✔
32
                return false;
33

34
        return ascii_is_valid(p);
4,531✔
35
}
36

37
bool file_url_is_valid(const char *url) {
37,094✔
38
        const char *p;
37,094✔
39

40
        if (isempty(url))
37,094✔
41
                return false;
42

43
        p = startswith(url, "file:/");
37,094✔
44
        if (isempty(p))
37,094✔
45
                return false;
46

47
        return ascii_is_valid(p);
86✔
48
}
49

50
bool documentation_url_is_valid(const char *url) {
41,541✔
51
        const char *p;
41,541✔
52

53
        if (isempty(url))
41,541✔
54
                return false;
41,541✔
55

56
        if (http_url_is_valid(url) || file_url_is_valid(url))
41,540✔
57
                return true;
58

59
        p = STARTSWITH_SET(url, "info:", "man:");
37,008✔
60
        if (isempty(p))
37,008✔
61
                return false;
62

63
        return ascii_is_valid(p);
37,006✔
64
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc