udev-rules.c:freep:
   78|    630|static inline void freep(void *p) {
   79|    630|        *(void**)p = mfree(*(void**) p);
  ------------------
  |  |  404|    630|        ({                                      \
  |  |  405|    630|                free(memory);                   \
  |  |  406|    630|                (typeof(memory)) NULL;          \
  |  |  407|    630|        })
  ------------------
   80|    630|}
fuzz-udev-rule-parse-value.c:freep:
   78|    715|static inline void freep(void *p) {
   79|    715|        *(void**)p = mfree(*(void**) p);
  ------------------
  |  |  404|    715|        ({                                      \
  |  |  405|    715|                free(memory);                   \
  |  |  406|    715|                (typeof(memory)) NULL;          \
  |  |  407|    715|        })
  ------------------
   80|    715|}
escape.c:malloc_multiply:
   88|    594|_malloc_ _alloc_(1, 2) static inline void *malloc_multiply(size_t need, size_t size) {
   89|    594|        if (size_multiply_overflow(size, need))
  ------------------
  |  Branch (89:13): [True: 0, False: 594]
  ------------------
   90|      0|                return NULL;
   91|       |
   92|    594|        return malloc(size * need ?: 1);
  ------------------
  |  Branch (92:23): [True: 594, False: 0]
  ------------------
   93|    594|}
escape.c:size_multiply_overflow:
   84|    594|static inline bool size_multiply_overflow(size_t size, size_t need) {
   85|    594|        return _unlikely_(need != 0 && size > (SIZE_MAX / need));
  ------------------
  |  |   95|  1.18k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  ------------------
  |  |  |  Branch (95:44): [True: 594, False: 0]
  |  |  |  Branch (95:44): [True: 0, False: 594]
  |  |  ------------------
  ------------------
   86|    594|}
escape.c:freep:
   78|    594|static inline void freep(void *p) {
   79|    594|        *(void**)p = mfree(*(void**) p);
  ------------------
  |  |  404|    594|        ({                                      \
  |  |  405|    594|                free(memory);                   \
  |  |  406|    594|                (typeof(memory)) NULL;          \
  |  |  407|    594|        })
  ------------------
   80|    594|}
log.c:freep:
   78|    715|static inline void freep(void *p) {
   79|    715|        *(void**)p = mfree(*(void**) p);
  ------------------
  |  |  404|    715|        ({                                      \
  |  |  405|    715|                free(memory);                   \
  |  |  406|    715|                (typeof(memory)) NULL;          \
  |  |  407|    715|        })
  ------------------
   80|    715|}

invoked_by_systemd:
   41|    715|bool invoked_by_systemd(void) {
   42|    715|        int r;
   43|       |
   44|       |        /* If the process is directly executed by PID1 (e.g. ExecStart= or generator), systemd-importd,
   45|       |         * or systemd-homed, then $SYSTEMD_EXEC_PID= is set, and read the command line. */
   46|    715|        const char *e = getenv("SYSTEMD_EXEC_PID");
   47|    715|        if (!e)
  ------------------
  |  Branch (47:13): [True: 715, False: 0]
  ------------------
   48|    715|                return false;
   49|       |
   50|      0|        if (streq(e, "*"))
  ------------------
  |  |   46|      0|#define streq(a,b) (strcmp((a),(b)) == 0)
  |  |  ------------------
  |  |  |  Branch (46:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
   51|       |                /* For testing. */
   52|      0|                return true;
   53|       |
   54|      0|        pid_t p;
   55|      0|        r = parse_pid(e, &p);
   56|      0|        if (r < 0) {
  ------------------
  |  Branch (56:13): [True: 0, False: 0]
  ------------------
   57|       |                /* We know that systemd sets the variable correctly. Something else must have set it. */
   58|      0|                log_debug_errno(r, "Failed to parse \"SYSTEMD_EXEC_PID=%s\", ignoring: %m", e);
  ------------------
  |  |  228|      0|#define log_debug_errno(error, ...)     log_full_errno(LOG_DEBUG,   error, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  204|      0|        ({                                                              \
  |  |  |  |  205|      0|                int _error = (error);                                   \
  |  |  |  |  206|      0|                ASSERT_NON_ZERO(_error);                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |  198|      0|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |  |  |  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   61|      0|        } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  207|      0|                log_full_errno_zerook(level, _error, __VA_ARGS__);      \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|      0|        ({                                                              \
  |  |  |  |  |  |  190|      0|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|      0|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|      0|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|        })
  |  |  |  |  ------------------
  |  |  |  |  208|      0|        })
  |  |  ------------------
  ------------------
   59|      0|                return false;
   60|      0|        }
   61|       |
   62|      0|        return getpid_cached() == p;
   63|      0|}

log_set_assert_return_is_critical:
   16|    715|void log_set_assert_return_is_critical(bool b) {
   17|    715|        assert_return_is_critical = b;
   18|    715|}

getenv_bool:
  991|    715|int getenv_bool(const char *p) {
  992|    715|        const char *e;
  993|       |
  994|    715|        e = getenv(p);
  995|    715|        if (!e)
  ------------------
  |  Branch (995:13): [True: 715, False: 0]
  ------------------
  996|    715|                return -ENXIO;
  997|       |
  998|      0|        return parse_boolean(e);
  999|    715|}

log.c:_reset_errno_:
   23|    715|static inline void _reset_errno_(int *saved_errno) {
   24|    715|        if (*saved_errno < 0) /* Invalidated by UNPROTECT_ERRNO? */
  ------------------
  |  Branch (24:13): [True: 0, False: 715]
  ------------------
   25|      0|                return;
   26|       |
   27|    715|        errno = *saved_errno;
   28|    715|}

cunescape_one:
  104|  99.8k|int cunescape_one(const char *p, size_t length, char32_t *ret, bool *eight_bit, bool accept_nul) {
  105|  99.8k|        int r = 1;
  106|       |
  107|  99.8k|        assert(p);
  ------------------
  |  |   72|  99.8k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  99.8k|        do {                                                            \
  |  |  |  |   59|  99.8k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  99.8k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 99.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  99.8k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  99.8k|        } while (false)
  |  |  ------------------
  ------------------
  108|  99.8k|        assert(ret);
  ------------------
  |  |   72|  99.8k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  99.8k|        do {                                                            \
  |  |  |  |   59|  99.8k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  99.8k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 99.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  99.8k|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  99.8k|        } while (false)
  |  |  ------------------
  ------------------
  109|       |
  110|       |        /* Unescapes C style. Returns the unescaped character in ret.
  111|       |         * Sets *eight_bit to true if the escaped sequence either fits in
  112|       |         * one byte in UTF-8 or is a non-unicode literal byte and should
  113|       |         * instead be copied directly.
  114|       |         */
  115|       |
  116|  99.8k|        if (length != SIZE_MAX && length < 1)
  ------------------
  |  Branch (116:13): [True: 99.8k, False: 0]
  |  Branch (116:35): [True: 0, False: 99.8k]
  ------------------
  117|      0|                return -EINVAL;
  118|       |
  119|  99.8k|        switch (p[0]) {
  120|       |
  121|  3.58k|        case 'a':
  ------------------
  |  Branch (121:9): [True: 3.58k, False: 96.2k]
  ------------------
  122|  3.58k|                *ret = '\a';
  123|  3.58k|                break;
  124|    588|        case 'b':
  ------------------
  |  Branch (124:9): [True: 588, False: 99.2k]
  ------------------
  125|    588|                *ret = '\b';
  126|    588|                break;
  127|  6.78k|        case 'f':
  ------------------
  |  Branch (127:9): [True: 6.78k, False: 93.0k]
  ------------------
  128|  6.78k|                *ret = '\f';
  129|  6.78k|                break;
  130|  5.49k|        case 'n':
  ------------------
  |  Branch (130:9): [True: 5.49k, False: 94.3k]
  ------------------
  131|  5.49k|                *ret = '\n';
  132|  5.49k|                break;
  133|  1.87k|        case 'r':
  ------------------
  |  Branch (133:9): [True: 1.87k, False: 97.9k]
  ------------------
  134|  1.87k|                *ret = '\r';
  135|  1.87k|                break;
  136|  25.7k|        case 't':
  ------------------
  |  Branch (136:9): [True: 25.7k, False: 74.0k]
  ------------------
  137|  25.7k|                *ret = '\t';
  138|  25.7k|                break;
  139|  1.19k|        case 'v':
  ------------------
  |  Branch (139:9): [True: 1.19k, False: 98.6k]
  ------------------
  140|  1.19k|                *ret = '\v';
  141|  1.19k|                break;
  142|  3.67k|        case '\\':
  ------------------
  |  Branch (142:9): [True: 3.67k, False: 96.1k]
  ------------------
  143|  3.67k|                *ret = '\\';
  144|  3.67k|                break;
  145|    687|        case '"':
  ------------------
  |  Branch (145:9): [True: 687, False: 99.1k]
  ------------------
  146|    687|                *ret = '"';
  147|    687|                break;
  148|    686|        case '\'':
  ------------------
  |  Branch (148:9): [True: 686, False: 99.1k]
  ------------------
  149|    686|                *ret = '\'';
  150|    686|                break;
  151|       |
  152|  1.33k|        case 's':
  ------------------
  |  Branch (152:9): [True: 1.33k, False: 98.4k]
  ------------------
  153|       |                /* This is an extension of the XDG syntax files */
  154|  1.33k|                *ret = ' ';
  155|  1.33k|                break;
  156|       |
  157|  17.6k|        case 'x': {
  ------------------
  |  Branch (157:9): [True: 17.6k, False: 82.1k]
  ------------------
  158|       |                /* hexadecimal encoding */
  159|  17.6k|                int a, b;
  160|       |
  161|  17.6k|                if (length != SIZE_MAX && length < 3)
  ------------------
  |  Branch (161:21): [True: 17.6k, False: 0]
  |  Branch (161:43): [True: 3, False: 17.6k]
  ------------------
  162|      3|                        return -EINVAL;
  163|       |
  164|  17.6k|                a = unhexchar(p[1]);
  165|  17.6k|                if (a < 0)
  ------------------
  |  Branch (165:21): [True: 20, False: 17.6k]
  ------------------
  166|     20|                        return -EINVAL;
  167|       |
  168|  17.6k|                b = unhexchar(p[2]);
  169|  17.6k|                if (b < 0)
  ------------------
  |  Branch (169:21): [True: 14, False: 17.6k]
  ------------------
  170|     14|                        return -EINVAL;
  171|       |
  172|       |                /* Don't allow NUL bytes */
  173|  17.6k|                if (a == 0 && b == 0 && !accept_nul)
  ------------------
  |  Branch (173:21): [True: 12.6k, False: 4.98k]
  |  Branch (173:31): [True: 5, False: 12.6k]
  |  Branch (173:41): [True: 5, False: 0]
  ------------------
  174|      5|                        return -EINVAL;
  175|       |
  176|  17.6k|                *ret = (a << 4U) | b;
  177|  17.6k|                *eight_bit = true;
  178|  17.6k|                r = 3;
  179|  17.6k|                break;
  180|  17.6k|        }
  181|       |
  182|  19.2k|        case 'u': {
  ------------------
  |  Branch (182:9): [True: 19.2k, False: 80.5k]
  ------------------
  183|       |                /* C++11 style 16-bit unicode */
  184|       |
  185|  19.2k|                int a[4];
  186|  19.2k|                size_t i;
  187|  19.2k|                uint32_t c;
  188|       |
  189|  19.2k|                if (length != SIZE_MAX && length < 5)
  ------------------
  |  Branch (189:21): [True: 19.2k, False: 0]
  |  Branch (189:43): [True: 4, False: 19.2k]
  ------------------
  190|      4|                        return -EINVAL;
  191|       |
  192|  96.3k|                for (i = 0; i < 4; i++) {
  ------------------
  |  Branch (192:29): [True: 77.0k, False: 19.2k]
  ------------------
  193|  77.0k|                        a[i] = unhexchar(p[1 + i]);
  194|  77.0k|                        if (a[i] < 0)
  ------------------
  |  Branch (194:29): [True: 10, False: 77.0k]
  ------------------
  195|     10|                                return a[i];
  196|  77.0k|                }
  197|       |
  198|  19.2k|                c = ((uint32_t) a[0] << 12U) | ((uint32_t) a[1] << 8U) | ((uint32_t) a[2] << 4U) | (uint32_t) a[3];
  199|       |
  200|       |                /* Don't allow 0 chars */
  201|  19.2k|                if (c == 0 && !accept_nul)
  ------------------
  |  Branch (201:21): [True: 4, False: 19.2k]
  |  Branch (201:31): [True: 4, False: 0]
  ------------------
  202|      4|                        return -EINVAL;
  203|       |
  204|  19.2k|                *ret = c;
  205|  19.2k|                r = 5;
  206|  19.2k|                break;
  207|  19.2k|        }
  208|       |
  209|  2.14k|        case 'U': {
  ------------------
  |  Branch (209:9): [True: 2.14k, False: 97.6k]
  ------------------
  210|       |                /* C++11 style 32-bit unicode */
  211|       |
  212|  2.14k|                int a[8];
  213|  2.14k|                size_t i;
  214|  2.14k|                char32_t c;
  215|       |
  216|  2.14k|                if (length != SIZE_MAX && length < 9)
  ------------------
  |  Branch (216:21): [True: 2.14k, False: 0]
  |  Branch (216:43): [True: 5, False: 2.13k]
  ------------------
  217|      5|                        return -EINVAL;
  218|       |
  219|  19.1k|                for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (219:29): [True: 17.0k, False: 2.12k]
  ------------------
  220|  17.0k|                        a[i] = unhexchar(p[1 + i]);
  221|  17.0k|                        if (a[i] < 0)
  ------------------
  |  Branch (221:29): [True: 11, False: 17.0k]
  ------------------
  222|     11|                                return a[i];
  223|  17.0k|                }
  224|       |
  225|  2.12k|                c = ((uint32_t) a[0] << 28U) | ((uint32_t) a[1] << 24U) | ((uint32_t) a[2] << 20U) | ((uint32_t) a[3] << 16U) |
  226|  2.12k|                    ((uint32_t) a[4] << 12U) | ((uint32_t) a[5] <<  8U) | ((uint32_t) a[6] <<  4U) |  (uint32_t) a[7];
  227|       |
  228|       |                /* Don't allow 0 chars */
  229|  2.12k|                if (c == 0 && !accept_nul)
  ------------------
  |  Branch (229:21): [True: 4, False: 2.12k]
  |  Branch (229:31): [True: 4, False: 0]
  ------------------
  230|      4|                        return -EINVAL;
  231|       |
  232|       |                /* Don't allow invalid code points */
  233|  2.12k|                if (!unichar_is_valid(c))
  ------------------
  |  Branch (233:21): [True: 59, False: 2.06k]
  ------------------
  234|     59|                        return -EINVAL;
  235|       |
  236|  2.06k|                *ret = c;
  237|  2.06k|                r = 9;
  238|  2.06k|                break;
  239|  2.12k|        }
  240|       |
  241|  1.72k|        case '0':
  ------------------
  |  Branch (241:9): [True: 1.72k, False: 98.0k]
  ------------------
  242|  5.56k|        case '1':
  ------------------
  |  Branch (242:9): [True: 3.84k, False: 95.9k]
  ------------------
  243|  6.42k|        case '2':
  ------------------
  |  Branch (243:9): [True: 860, False: 98.9k]
  ------------------
  244|  9.06k|        case '3':
  ------------------
  |  Branch (244:9): [True: 2.63k, False: 97.1k]
  ------------------
  245|  9.07k|        case '4':
  ------------------
  |  Branch (245:9): [True: 7, False: 99.8k]
  ------------------
  246|  9.07k|        case '5':
  ------------------
  |  Branch (246:9): [True: 4, False: 99.8k]
  ------------------
  247|  9.07k|        case '6':
  ------------------
  |  Branch (247:9): [True: 3, False: 99.8k]
  ------------------
  248|  9.08k|        case '7': {
  ------------------
  |  Branch (248:9): [True: 4, False: 99.8k]
  ------------------
  249|       |                /* octal encoding */
  250|  9.08k|                int a, b, c;
  251|  9.08k|                char32_t m;
  252|       |
  253|  9.08k|                if (length != SIZE_MAX && length < 3)
  ------------------
  |  Branch (253:21): [True: 9.08k, False: 0]
  |  Branch (253:43): [True: 37, False: 9.04k]
  ------------------
  254|     37|                        return -EINVAL;
  255|       |
  256|  9.04k|                a = unoctchar(p[0]);
  257|  9.04k|                if (a < 0)
  ------------------
  |  Branch (257:21): [True: 0, False: 9.04k]
  ------------------
  258|      0|                        return -EINVAL;
  259|       |
  260|  9.04k|                b = unoctchar(p[1]);
  261|  9.04k|                if (b < 0)
  ------------------
  |  Branch (261:21): [True: 20, False: 9.02k]
  ------------------
  262|     20|                        return -EINVAL;
  263|       |
  264|  9.02k|                c = unoctchar(p[2]);
  265|  9.02k|                if (c < 0)
  ------------------
  |  Branch (265:21): [True: 14, False: 9.01k]
  ------------------
  266|     14|                        return -EINVAL;
  267|       |
  268|       |                /* don't allow NUL bytes */
  269|  9.01k|                if (a == 0 && b == 0 && c == 0 && !accept_nul)
  ------------------
  |  Branch (269:21): [True: 1.70k, False: 7.31k]
  |  Branch (269:31): [True: 256, False: 1.44k]
  |  Branch (269:41): [True: 1, False: 255]
  |  Branch (269:51): [True: 1, False: 0]
  ------------------
  270|      1|                        return -EINVAL;
  271|       |
  272|       |                /* Don't allow bytes above 255 */
  273|  9.01k|                m = ((uint32_t) a << 6U) | ((uint32_t) b << 3U) | (uint32_t) c;
  274|  9.01k|                if (m > 255)
  ------------------
  |  Branch (274:21): [True: 8, False: 9.00k]
  ------------------
  275|      8|                        return -EINVAL;
  276|       |
  277|  9.00k|                *ret = m;
  278|  9.00k|                *eight_bit = true;
  279|  9.00k|                r = 3;
  280|  9.00k|                break;
  281|  9.01k|        }
  282|       |
  283|     15|        default:
  ------------------
  |  Branch (283:9): [True: 15, False: 99.8k]
  ------------------
  284|     15|                return -EINVAL;
  285|  99.8k|        }
  286|       |
  287|  99.5k|        return r;
  288|  99.8k|}
cunescape_length_with_prefix:
  290|    594|ssize_t cunescape_length_with_prefix(const char *s, size_t length, const char *prefix, UnescapeFlags flags, char **ret) {
  291|    594|        _cleanup_free_ char *ans = NULL;
  ------------------
  |  |   82|    594|#define _cleanup_free_ _cleanup_(freep)
  |  |  ------------------
  |  |  |  |   78|    594|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
  292|    594|        char *t;
  293|    594|        const char *f;
  294|    594|        size_t pl;
  295|    594|        int r;
  296|       |
  297|    594|        assert(s);
  ------------------
  |  |   72|    594|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|    594|        do {                                                            \
  |  |  |  |   59|    594|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|    594|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 594]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|    594|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|    594|        } while (false)
  |  |  ------------------
  ------------------
  298|    594|        assert(ret);
  ------------------
  |  |   72|    594|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|    594|        do {                                                            \
  |  |  |  |   59|    594|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|    594|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 594]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|    594|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|    594|        } while (false)
  |  |  ------------------
  ------------------
  299|       |
  300|       |        /* Undoes C style string escaping, and optionally prefixes it. */
  301|       |
  302|    594|        if (length == SIZE_MAX)
  ------------------
  |  Branch (302:13): [True: 0, False: 594]
  ------------------
  303|      0|                length = strlen(s);
  304|       |
  305|    594|        pl = strlen_ptr(prefix);
  306|       |
  307|    594|        ans = new(char, pl+length+1);
  ------------------
  |  |   17|    594|#define new(t, n) ((t*) malloc_multiply(n, sizeof(t)))
  ------------------
  308|    594|        if (!ans)
  ------------------
  |  Branch (308:13): [True: 0, False: 594]
  ------------------
  309|      0|                return -ENOMEM;
  310|       |
  311|    594|        if (prefix)
  ------------------
  |  Branch (311:13): [True: 0, False: 594]
  ------------------
  312|      0|                memcpy(ans, prefix, pl);
  313|       |
  314|  6.27M|        for (f = s, t = ans + pl; f < s + length; f++) {
  ------------------
  |  Branch (314:35): [True: 6.27M, False: 360]
  ------------------
  315|  6.27M|                size_t remaining;
  316|  6.27M|                bool eight_bit = false;
  317|  6.27M|                char32_t u;
  318|       |
  319|  6.27M|                remaining = s + length - f;
  320|  6.27M|                assert(remaining > 0);
  ------------------
  |  |   72|  6.27M|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  6.27M|        do {                                                            \
  |  |  |  |   59|  6.27M|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  6.27M|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 6.27M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  6.27M|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|  6.27M|        } while (false)
  |  |  ------------------
  ------------------
  321|       |
  322|  6.27M|                if (*f != '\\') {
  ------------------
  |  Branch (322:21): [True: 6.17M, False: 99.8k]
  ------------------
  323|       |                        /* A literal, copy verbatim */
  324|  6.17M|                        *(t++) = *f;
  325|  6.17M|                        continue;
  326|  6.17M|                }
  327|       |
  328|  99.8k|                if (remaining == 1) {
  ------------------
  |  Branch (328:21): [True: 0, False: 99.8k]
  ------------------
  329|      0|                        if (flags & UNESCAPE_RELAX) {
  ------------------
  |  Branch (329:29): [True: 0, False: 0]
  ------------------
  330|       |                                /* A trailing backslash, copy verbatim */
  331|      0|                                *(t++) = *f;
  332|      0|                                continue;
  333|      0|                        }
  334|       |
  335|      0|                        return -EINVAL;
  336|      0|                }
  337|       |
  338|  99.8k|                r = cunescape_one(f + 1, remaining - 1, &u, &eight_bit, flags & UNESCAPE_ACCEPT_NUL);
  339|  99.8k|                if (r < 0) {
  ------------------
  |  Branch (339:21): [True: 234, False: 99.5k]
  ------------------
  340|    234|                        if (flags & UNESCAPE_RELAX) {
  ------------------
  |  Branch (340:29): [True: 0, False: 234]
  ------------------
  341|       |                                /* Invalid escape code, let's take it literal then */
  342|      0|                                *(t++) = '\\';
  343|      0|                                continue;
  344|      0|                        }
  345|       |
  346|    234|                        return r;
  347|    234|                }
  348|       |
  349|  99.5k|                f += r;
  350|  99.5k|                if (eight_bit)
  ------------------
  |  Branch (350:21): [True: 26.6k, False: 72.9k]
  ------------------
  351|       |                        /* One byte? Set directly as specified */
  352|  26.6k|                        *(t++) = u;
  353|  72.9k|                else
  354|       |                        /* Otherwise encode as multi-byte UTF-8 */
  355|  72.9k|                        t += utf8_encode_unichar(t, u);
  356|  99.5k|        }
  357|       |
  358|    360|        *t = 0;
  359|       |
  360|    360|        assert(t >= ans); /* Let static analyzers know that the answer is non-negative. */
  ------------------
  |  |   72|    360|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|    360|        do {                                                            \
  |  |  |  |   59|    360|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|    360|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 360]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|    360|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|    360|        } while (false)
  |  |  ------------------
  ------------------
  361|    360|        *ret = TAKE_PTR(ans);
  ------------------
  |  |  388|    360|#define TAKE_PTR(ptr) TAKE_PTR_TYPE(ptr, typeof(ptr))
  |  |  ------------------
  |  |  |  |  387|    360|#define TAKE_PTR_TYPE(ptr, type) TAKE_GENERIC(ptr, type, NULL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  380|    360|        ({                                                       \
  |  |  |  |  |  |  381|    360|                type *_pvar_ = &(var);                           \
  |  |  |  |  |  |  382|    360|                type _var_ = *_pvar_;                            \
  |  |  |  |  |  |  383|    360|                type _nullvalue_ = nullvalue;                    \
  |  |  |  |  |  |  384|    360|                *_pvar_ = _nullvalue_;                           \
  |  |  |  |  |  |  385|    360|                _var_;                                           \
  |  |  |  |  |  |  386|    360|        })
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  362|    360|        return t - *ret;
  363|    594|}

udev-rules.c:cunescape_length:
   46|    594|static inline ssize_t cunescape_length(const char *s, size_t length, UnescapeFlags flags, char **ret) {
   47|    594|        return cunescape_length_with_prefix(s, length, NULL, flags, ret);
   48|    594|}

safe_close:
   56|  1.43k|int safe_close(int fd) {
   57|       |        /*
   58|       |         * Like close_nointr() but cannot fail. Guarantees errno is unchanged. Is a noop for negative fds,
   59|       |         * and returns -EBADF, so that it can be used in this syntax:
   60|       |         *
   61|       |         * fd = safe_close(fd);
   62|       |         */
   63|       |
   64|  1.43k|        if (fd >= 0) {
  ------------------
  |  Branch (64:13): [True: 0, False: 1.43k]
  ------------------
   65|      0|                PROTECT_ERRNO;
  ------------------
  |  |   31|      0|        _cleanup_(_reset_errno_) _unused_ int _saved_errno_ = errno
  |  |  ------------------
  |  |  |  |   78|      0|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
   66|       |
   67|       |                /* The kernel might return pretty much any error code
   68|       |                 * via close(), but the fd will be closed anyway. The
   69|       |                 * only condition we want to check for here is whether
   70|       |                 * the fd was invalid at all... */
   71|       |
   72|      0|                assert_se(close_nointr(fd) != -EBADF);
  ------------------
  |  |   65|      0|#define assert_se(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|      0|        } while (false)
  |  |  ------------------
  ------------------
   73|      0|        }
   74|       |
   75|  1.43k|        return -EBADF;
   76|  1.43k|}

unoctchar:
   15|  27.1k|int unoctchar(char c) {
   16|       |
   17|  27.1k|        if (c >= '0' && c <= '7')
  ------------------
  |  Branch (17:13): [True: 27.1k, False: 15]
  |  Branch (17:25): [True: 27.0k, False: 19]
  ------------------
   18|  27.0k|                return c - '0';
   19|       |
   20|     34|        return -EINVAL;
   21|  27.1k|}
unhexchar:
   41|   129k|int unhexchar(char c) {
   42|       |
   43|   129k|        if (c >= '0' && c <= '9')
  ------------------
  |  Branch (43:13): [True: 129k, False: 27]
  |  Branch (43:25): [True: 55.1k, False: 74.1k]
  ------------------
   44|  55.1k|                return c - '0';
   45|       |
   46|  74.2k|        if (c >= 'a' && c <= 'f')
  ------------------
  |  Branch (46:13): [True: 59.6k, False: 14.6k]
  |  Branch (46:25): [True: 59.5k, False: 10]
  ------------------
   47|  59.5k|                return c - 'a' + 10;
   48|       |
   49|  14.6k|        if (c >= 'A' && c <= 'F')
  ------------------
  |  Branch (49:13): [True: 14.5k, False: 32]
  |  Branch (49:25): [True: 14.5k, False: 23]
  ------------------
   50|  14.5k|                return c - 'A' + 10;
   51|       |
   52|     55|        return -EINVAL;
   53|  14.6k|}

stderr_is_journal:
  233|    715|bool stderr_is_journal(void) {
  234|    715|        _cleanup_free_ char *w = NULL;
  ------------------
  |  |   82|    715|#define _cleanup_free_ _cleanup_(freep)
  |  |  ------------------
  |  |  |  |   78|    715|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
  235|    715|        const char *e;
  236|    715|        uint64_t dev, ino;
  237|    715|        struct stat st;
  238|       |
  239|    715|        e = getenv("JOURNAL_STREAM");
  240|    715|        if (!e)
  ------------------
  |  Branch (240:13): [True: 715, False: 0]
  ------------------
  241|    715|                return false;
  242|       |
  243|      0|        if (extract_first_word(&e, &w, ":", EXTRACT_DONT_COALESCE_SEPARATORS) <= 0)
  ------------------
  |  Branch (243:13): [True: 0, False: 0]
  ------------------
  244|      0|                return false;
  245|      0|        if (!e)
  ------------------
  |  Branch (245:13): [True: 0, False: 0]
  ------------------
  246|      0|                return false;
  247|       |
  248|      0|        if (safe_atou64(w, &dev) < 0)
  ------------------
  |  Branch (248:13): [True: 0, False: 0]
  ------------------
  249|      0|                return false;
  250|      0|        if (safe_atou64(e, &ino) < 0)
  ------------------
  |  Branch (250:13): [True: 0, False: 0]
  ------------------
  251|      0|                return false;
  252|       |
  253|      0|        if (fstat(STDERR_FILENO, &st) < 0)
  ------------------
  |  Branch (253:13): [True: 0, False: 0]
  ------------------
  254|      0|                return false;
  255|       |
  256|      0|        return st.st_dev == dev && st.st_ino == ino;
  ------------------
  |  Branch (256:16): [True: 0, False: 0]
  |  Branch (256:36): [True: 0, False: 0]
  ------------------
  257|      0|}
log_open:
  259|    715|int log_open(void) {
  260|    715|        int r;
  261|       |
  262|       |        /* Do not call from library code. */
  263|       |
  264|       |        /* This function is often called in preparation for logging. Let's make sure we don't clobber errno,
  265|       |         * so that a call to a logging function immediately following a log_open() call can still easily
  266|       |         * reference an error that happened immediately before the log_open() call. */
  267|    715|        PROTECT_ERRNO;
  ------------------
  |  |   31|    715|        _cleanup_(_reset_errno_) _unused_ int _saved_errno_ = errno
  |  |  ------------------
  |  |  |  |   78|    715|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
  268|       |
  269|       |        /* If we don't use the console, we close it here to not get killed by SAK. If we don't use syslog, we
  270|       |         * close it here too, so that we are not confused by somebody deleting the socket in the fs, and to
  271|       |         * make sure we don't use it if prohibit_ipc is set. If we don't use /dev/kmsg we still keep it open,
  272|       |         * because there is no reason to close it. */
  273|       |
  274|    715|        if (log_target == LOG_TARGET_NULL) {
  ------------------
  |  Branch (274:13): [True: 0, False: 715]
  ------------------
  275|      0|                log_close_journal();
  276|      0|                log_close_syslog();
  277|      0|                log_close_console();
  278|      0|                return 0;
  279|      0|        }
  280|       |
  281|    715|        if (getpid_cached() == 1 ||
  ------------------
  |  Branch (281:13): [True: 0, False: 715]
  ------------------
  282|    715|            stderr_is_journal() ||
  ------------------
  |  Branch (282:13): [True: 0, False: 715]
  ------------------
  283|    715|            IN_SET(log_target,
  ------------------
  |  |  361|    715|        ({                                                              \
  |  |  ------------------
  |  |  |  Branch (361:9): [True: 0, False: 715]
  |  |  ------------------
  |  |  362|    715|                bool _found = false;                                    \
  |  |  363|    715|                /* If the build breaks in the line below, you need to extend the case macros. We use typeof(+x) \
  |  |  364|    715|                 * here to widen the type of x if it is a bit-field as this would otherwise be illegal. */      \
  |  |  365|    715|                static const typeof(+x) __assert_in_set[] _unused_ = { first, __VA_ARGS__ }; \
  |  |  366|    715|                assert_cc(ELEMENTSOF(__assert_in_set) <= 20);           \
  |  |  ------------------
  |  |  |  |  142|    715|#define assert_cc(expr) _Static_assert(expr, #expr)
  |  |  ------------------
  |  |  367|    715|                switch (x) {                                            \
  |  |  368|      0|                FOR_EACH_MAKE_CASE(first, __VA_ARGS__)                  \
  |  |  ------------------
  |  |  |  |  356|      0|        GET_CASE_F(__VA_ARGS__,CASE_F_20,CASE_F_19,CASE_F_18,CASE_F_17,CASE_F_16,CASE_F_15,CASE_F_14,CASE_F_13,CASE_F_12,CASE_F_11, \
  |  |  |  |  ------------------
  |  |  |  |  |  |  354|      0|#define GET_CASE_F(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,NAME,...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  357|      0|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  337|      0|#define  CASE_F_5(X, ...) case X:  CASE_F_4( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  336|      0|#define  CASE_F_4(X, ...) case X:  CASE_F_3( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  335|      0|#define  CASE_F_3(X, ...) case X:  CASE_F_2( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  334|      0|#define  CASE_F_2(X, ...) case X:  CASE_F_1( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  333|      0|#define  CASE_F_1(X)      case X:
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (333:27): [True: 0, False: 715]
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (334:27): [True: 0, False: 715]
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (335:27): [True: 0, False: 715]
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (336:27): [True: 0, False: 715]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (337:27): [True: 0, False: 715]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  357|      0|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  358|      0|                   (__VA_ARGS__)
  |  |  ------------------
  |  |  369|      0|                        _found = true;                                  \
  |  |  370|      0|                        break;                                          \
  |  |  371|    715|                default:                                                \
  |  |  ------------------
  |  |  |  Branch (371:17): [True: 715, False: 0]
  |  |  ------------------
  |  |  372|    715|                        ;                                               \
  |  |  373|    715|                }                                                       \
  |  |  374|    715|                _found;                                                 \
  |  |  375|    715|        })
  ------------------
  284|    715|                   LOG_TARGET_KMSG,
  285|    715|                   LOG_TARGET_JOURNAL,
  286|    715|                   LOG_TARGET_JOURNAL_OR_KMSG,
  287|    715|                   LOG_TARGET_SYSLOG,
  288|    715|                   LOG_TARGET_SYSLOG_OR_KMSG)) {
  289|       |
  290|      0|                if (!prohibit_ipc) {
  ------------------
  |  Branch (290:21): [True: 0, False: 0]
  ------------------
  291|      0|                        if (IN_SET(log_target,
  ------------------
  |  |  361|      0|        ({                                                              \
  |  |  ------------------
  |  |  |  Branch (361:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  362|      0|                bool _found = false;                                    \
  |  |  363|      0|                /* If the build breaks in the line below, you need to extend the case macros. We use typeof(+x) \
  |  |  364|      0|                 * here to widen the type of x if it is a bit-field as this would otherwise be illegal. */      \
  |  |  365|      0|                static const typeof(+x) __assert_in_set[] _unused_ = { first, __VA_ARGS__ }; \
  |  |  366|      0|                assert_cc(ELEMENTSOF(__assert_in_set) <= 20);           \
  |  |  ------------------
  |  |  |  |  142|      0|#define assert_cc(expr) _Static_assert(expr, #expr)
  |  |  ------------------
  |  |  367|      0|                switch (x) {                                            \
  |  |  368|      0|                FOR_EACH_MAKE_CASE(first, __VA_ARGS__)                  \
  |  |  ------------------
  |  |  |  |  356|      0|        GET_CASE_F(__VA_ARGS__,CASE_F_20,CASE_F_19,CASE_F_18,CASE_F_17,CASE_F_16,CASE_F_15,CASE_F_14,CASE_F_13,CASE_F_12,CASE_F_11, \
  |  |  |  |  ------------------
  |  |  |  |  |  |  354|      0|#define GET_CASE_F(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,NAME,...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  357|      0|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  335|      0|#define  CASE_F_3(X, ...) case X:  CASE_F_2( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  334|      0|#define  CASE_F_2(X, ...) case X:  CASE_F_1( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  333|      0|#define  CASE_F_1(X)      case X:
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (333:27): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (334:27): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (335:27): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  357|      0|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  358|      0|                   (__VA_ARGS__)
  |  |  ------------------
  |  |  369|      0|                        _found = true;                                  \
  |  |  370|      0|                        break;                                          \
  |  |  371|      0|                default:                                                \
  |  |  ------------------
  |  |  |  Branch (371:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  372|      0|                        ;                                               \
  |  |  373|      0|                }                                                       \
  |  |  374|      0|                _found;                                                 \
  |  |  375|      0|        })
  ------------------
  292|      0|                                   LOG_TARGET_AUTO,
  293|      0|                                   LOG_TARGET_JOURNAL_OR_KMSG,
  294|      0|                                   LOG_TARGET_JOURNAL)) {
  295|       |
  296|      0|                                r = log_open_journal();
  297|      0|                                if (r >= 0) {
  ------------------
  |  Branch (297:37): [True: 0, False: 0]
  ------------------
  298|      0|                                        log_close_syslog();
  299|      0|                                        log_close_console();
  300|      0|                                        return r;
  301|      0|                                }
  302|      0|                        }
  303|       |
  304|      0|                        if (IN_SET(log_target,
  ------------------
  |  |  361|      0|        ({                                                              \
  |  |  ------------------
  |  |  |  Branch (361:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  362|      0|                bool _found = false;                                    \
  |  |  363|      0|                /* If the build breaks in the line below, you need to extend the case macros. We use typeof(+x) \
  |  |  364|      0|                 * here to widen the type of x if it is a bit-field as this would otherwise be illegal. */      \
  |  |  365|      0|                static const typeof(+x) __assert_in_set[] _unused_ = { first, __VA_ARGS__ }; \
  |  |  366|      0|                assert_cc(ELEMENTSOF(__assert_in_set) <= 20);           \
  |  |  ------------------
  |  |  |  |  142|      0|#define assert_cc(expr) _Static_assert(expr, #expr)
  |  |  ------------------
  |  |  367|      0|                switch (x) {                                            \
  |  |  368|      0|                FOR_EACH_MAKE_CASE(first, __VA_ARGS__)                  \
  |  |  ------------------
  |  |  |  |  356|      0|        GET_CASE_F(__VA_ARGS__,CASE_F_20,CASE_F_19,CASE_F_18,CASE_F_17,CASE_F_16,CASE_F_15,CASE_F_14,CASE_F_13,CASE_F_12,CASE_F_11, \
  |  |  |  |  ------------------
  |  |  |  |  |  |  354|      0|#define GET_CASE_F(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,NAME,...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  357|      0|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  334|      0|#define  CASE_F_2(X, ...) case X:  CASE_F_1( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  333|      0|#define  CASE_F_1(X)      case X:
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (333:27): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (334:27): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  357|      0|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  358|      0|                   (__VA_ARGS__)
  |  |  ------------------
  |  |  369|      0|                        _found = true;                                  \
  |  |  370|      0|                        break;                                          \
  |  |  371|      0|                default:                                                \
  |  |  ------------------
  |  |  |  Branch (371:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  372|      0|                        ;                                               \
  |  |  373|      0|                }                                                       \
  |  |  374|      0|                _found;                                                 \
  |  |  375|      0|        })
  ------------------
  305|      0|                                   LOG_TARGET_SYSLOG_OR_KMSG,
  306|      0|                                   LOG_TARGET_SYSLOG)) {
  307|       |
  308|      0|                                r = log_open_syslog();
  309|      0|                                if (r >= 0) {
  ------------------
  |  Branch (309:37): [True: 0, False: 0]
  ------------------
  310|      0|                                        log_close_journal();
  311|      0|                                        log_close_console();
  312|      0|                                        return r;
  313|      0|                                }
  314|      0|                        }
  315|      0|                }
  316|       |
  317|      0|                if (IN_SET(log_target, LOG_TARGET_AUTO,
  ------------------
  |  |  361|      0|        ({                                                              \
  |  |  ------------------
  |  |  |  Branch (361:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  362|      0|                bool _found = false;                                    \
  |  |  363|      0|                /* If the build breaks in the line below, you need to extend the case macros. We use typeof(+x) \
  |  |  364|      0|                 * here to widen the type of x if it is a bit-field as this would otherwise be illegal. */      \
  |  |  365|      0|                static const typeof(+x) __assert_in_set[] _unused_ = { first, __VA_ARGS__ }; \
  |  |  366|      0|                assert_cc(ELEMENTSOF(__assert_in_set) <= 20);           \
  |  |  ------------------
  |  |  |  |  142|      0|#define assert_cc(expr) _Static_assert(expr, #expr)
  |  |  ------------------
  |  |  367|      0|                switch (x) {                                            \
  |  |  368|      0|                FOR_EACH_MAKE_CASE(first, __VA_ARGS__)                  \
  |  |  ------------------
  |  |  |  |  356|      0|        GET_CASE_F(__VA_ARGS__,CASE_F_20,CASE_F_19,CASE_F_18,CASE_F_17,CASE_F_16,CASE_F_15,CASE_F_14,CASE_F_13,CASE_F_12,CASE_F_11, \
  |  |  |  |  ------------------
  |  |  |  |  |  |  354|      0|#define GET_CASE_F(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,NAME,...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  357|      0|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  336|      0|#define  CASE_F_4(X, ...) case X:  CASE_F_3( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  335|      0|#define  CASE_F_3(X, ...) case X:  CASE_F_2( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  334|      0|#define  CASE_F_2(X, ...) case X:  CASE_F_1( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  333|      0|#define  CASE_F_1(X)      case X:
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (333:27): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (334:27): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (335:27): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (336:27): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  357|      0|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  358|      0|                   (__VA_ARGS__)
  |  |  ------------------
  |  |  369|      0|                        _found = true;                                  \
  |  |  370|      0|                        break;                                          \
  |  |  371|      0|                default:                                                \
  |  |  ------------------
  |  |  |  Branch (371:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  372|      0|                        ;                                               \
  |  |  373|      0|                }                                                       \
  |  |  374|      0|                _found;                                                 \
  |  |  375|      0|        })
  ------------------
  318|      0|                                       LOG_TARGET_JOURNAL_OR_KMSG,
  319|      0|                                       LOG_TARGET_SYSLOG_OR_KMSG,
  320|      0|                                       LOG_TARGET_KMSG)) {
  321|      0|                        r = log_open_kmsg();
  322|      0|                        if (r >= 0) {
  ------------------
  |  Branch (322:29): [True: 0, False: 0]
  ------------------
  323|      0|                                log_close_journal();
  324|      0|                                log_close_syslog();
  325|      0|                                log_close_console();
  326|      0|                                return r;
  327|      0|                        }
  328|      0|                }
  329|      0|        }
  330|       |
  331|    715|        log_close_journal();
  332|    715|        log_close_syslog();
  333|       |
  334|    715|        return log_open_console();
  335|    715|}
log_set_target:
  337|    715|void log_set_target(LogTarget target) {
  338|    715|        assert(target >= 0);
  ------------------
  |  |   72|    715|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|    715|        do {                                                            \
  |  |  |  |   59|    715|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|    715|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 715]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|    715|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|    715|        } while (false)
  |  |  ------------------
  ------------------
  339|    715|        assert(target < _LOG_TARGET_MAX);
  ------------------
  |  |   72|    715|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|    715|        do {                                                            \
  |  |  |  |   59|    715|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|    715|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 715]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|    715|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|    715|        } while (false)
  |  |  ------------------
  ------------------
  340|       |
  341|    715|        if (upgrade_syslog_to_journal) {
  ------------------
  |  Branch (341:13): [True: 0, False: 715]
  ------------------
  342|      0|                if (target == LOG_TARGET_SYSLOG)
  ------------------
  |  Branch (342:21): [True: 0, False: 0]
  ------------------
  343|      0|                        target = LOG_TARGET_JOURNAL;
  344|      0|                else if (target == LOG_TARGET_SYSLOG_OR_KMSG)
  ------------------
  |  Branch (344:26): [True: 0, False: 0]
  ------------------
  345|      0|                        target = LOG_TARGET_JOURNAL_OR_KMSG;
  346|      0|        }
  347|       |
  348|    715|        log_target = target;
  349|    715|}
log_set_max_level:
  372|    715|int log_set_max_level(int level) {
  373|    715|        assert(level == LOG_NULL || log_level_is_valid(level));
  ------------------
  |  |   72|    715|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|    715|        do {                                                            \
  |  |  |  |   59|    715|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.43k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 715]
  |  |  |  |  |  |  |  Branch (95:44): [True: 0, False: 715]
  |  |  |  |  |  |  |  Branch (95:44): [True: 715, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|    715|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|    715|        } while (false)
  |  |  ------------------
  ------------------
  374|       |
  375|    715|        int old = log_max_level;
  376|    715|        log_max_level = level;
  377|       |
  378|       |        /* Also propagate max log level to libc's syslog(), just in case some other component loaded into our
  379|       |         * process logs directly via syslog(). You might wonder why we maintain our own log level variable if
  380|       |         * libc has the same functionality. This has multiple reasons, first and foremost that we want to
  381|       |         * apply this to all our log targets, not just syslog and console. Moreover, we cannot query the
  382|       |         * current log mask from glibc without changing it, but that's useful for testing the current log
  383|       |         * level before even entering the log functions like we do in our macros. */
  384|    715|        setlogmask(LOG_UPTO(level));
  385|       |
  386|       |        /* Ensure that our own LOG_NULL define maps sanely to the log mask */
  387|    715|        assert_cc(LOG_UPTO(LOG_NULL) == 0);
  ------------------
  |  |  142|    715|#define assert_cc(expr) _Static_assert(expr, #expr)
  ------------------
  388|       |
  389|    715|        return old;
  390|    715|}
log_parse_environment_variables:
 1321|    715|void log_parse_environment_variables(void) {
 1322|    715|        const char *e;
 1323|    715|        int r;
 1324|       |
 1325|    715|        e = getenv("SYSTEMD_LOG_TARGET");
 1326|    715|        if (e && log_set_target_from_string(e) < 0)
  ------------------
  |  Branch (1326:13): [True: 0, False: 715]
  |  Branch (1326:18): [True: 0, False: 0]
  ------------------
 1327|    715|                log_warning("Failed to parse log target '%s', ignoring.", e);
  ------------------
  |  |  223|      0|#define log_warning(...)   log_full(LOG_WARNING, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  211|      0|        ({                                                             \
  |  |  |  |  212|      0|                if (BUILD_MODE_DEVELOPER)                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|      0|#define BUILD_MODE_DEVELOPER 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (23:30): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  213|      0|                        assert(!strstr(fmt, "%m"));                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|      0|        } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  214|      0|                (void) log_full_errno_zerook(level, 0, fmt, ##__VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|      0|        ({                                                              \
  |  |  |  |  |  |  190|      0|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|      0|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|      0|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|        })
  |  |  |  |  ------------------
  |  |  |  |  215|      0|        })
  |  |  ------------------
  ------------------
 1328|       |
 1329|    715|        e = getenv("SYSTEMD_LOG_LEVEL");
 1330|    715|        if (e) {
  ------------------
  |  Branch (1330:13): [True: 0, False: 715]
  ------------------
 1331|      0|                r = log_set_max_level_from_string(e);
 1332|      0|                if (r < 0)
  ------------------
  |  Branch (1332:21): [True: 0, False: 0]
  ------------------
 1333|      0|                        log_warning_errno(r, "Failed to parse log level '%s', ignoring: %m", e);
  ------------------
  |  |  231|      0|#define log_warning_errno(error, ...)   log_full_errno(LOG_WARNING, error, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  204|      0|        ({                                                              \
  |  |  |  |  205|      0|                int _error = (error);                                   \
  |  |  |  |  206|      0|                ASSERT_NON_ZERO(_error);                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |  198|      0|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |  |  |  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   61|      0|        } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  207|      0|                log_full_errno_zerook(level, _error, __VA_ARGS__);      \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|      0|        ({                                                              \
  |  |  |  |  |  |  190|      0|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|      0|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|      0|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|        })
  |  |  |  |  ------------------
  |  |  |  |  208|      0|        })
  |  |  ------------------
  ------------------
 1334|    715|        } else {
 1335|       |                /* If no explicit log level is specified then let's see if this is a debug invocation, and if
 1336|       |                 * so raise the log level to debug too. Note that this is not symmetric: just because
 1337|       |                 * DEBUG_INVOCATION is explicitly set to 0 we won't lower the log level below debug. This
 1338|       |                 * follows the logic that debug logging is an opt-in thing anyway, and if there's any reason
 1339|       |                 * to enable it we should not disable it here automatically. */
 1340|    715|                r = getenv_bool("DEBUG_INVOCATION");
 1341|    715|                if (r < 0 && r != -ENXIO)
  ------------------
  |  Branch (1341:21): [True: 715, False: 0]
  |  Branch (1341:30): [True: 0, False: 715]
  ------------------
 1342|    715|                        log_warning_errno(r, "Failed to parse $DEBUG_INVOCATION value, ignoring: %m");
  ------------------
  |  |  231|      0|#define log_warning_errno(error, ...)   log_full_errno(LOG_WARNING, error, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  204|      0|        ({                                                              \
  |  |  |  |  205|      0|                int _error = (error);                                   \
  |  |  |  |  206|      0|                ASSERT_NON_ZERO(_error);                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |  198|      0|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |  |  |  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   61|      0|        } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  207|      0|                log_full_errno_zerook(level, _error, __VA_ARGS__);      \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|      0|        ({                                                              \
  |  |  |  |  |  |  190|      0|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|      0|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|      0|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|        })
  |  |  |  |  ------------------
  |  |  |  |  208|      0|        })
  |  |  ------------------
  ------------------
 1343|    715|                else if (r > 0)
  ------------------
  |  Branch (1343:26): [True: 0, False: 715]
  ------------------
 1344|      0|                        log_set_max_level(LOG_DEBUG);
 1345|    715|        }
 1346|       |
 1347|    715|        e = getenv("SYSTEMD_LOG_COLOR");
 1348|    715|        if (e && log_show_color_from_string(e) < 0)
  ------------------
  |  Branch (1348:13): [True: 0, False: 715]
  |  Branch (1348:18): [True: 0, False: 0]
  ------------------
 1349|    715|                log_warning("Failed to parse log color '%s', ignoring.", e);
  ------------------
  |  |  223|      0|#define log_warning(...)   log_full(LOG_WARNING, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  211|      0|        ({                                                             \
  |  |  |  |  212|      0|                if (BUILD_MODE_DEVELOPER)                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|      0|#define BUILD_MODE_DEVELOPER 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (23:30): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  213|      0|                        assert(!strstr(fmt, "%m"));                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|      0|        } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  214|      0|                (void) log_full_errno_zerook(level, 0, fmt, ##__VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|      0|        ({                                                              \
  |  |  |  |  |  |  190|      0|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|      0|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|      0|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|        })
  |  |  |  |  ------------------
  |  |  |  |  215|      0|        })
  |  |  ------------------
  ------------------
 1350|       |
 1351|    715|        e = getenv("SYSTEMD_LOG_LOCATION");
 1352|    715|        if (e && log_show_location_from_string(e) < 0)
  ------------------
  |  Branch (1352:13): [True: 0, False: 715]
  |  Branch (1352:18): [True: 0, False: 0]
  ------------------
 1353|    715|                log_warning("Failed to parse log location '%s', ignoring.", e);
  ------------------
  |  |  223|      0|#define log_warning(...)   log_full(LOG_WARNING, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  211|      0|        ({                                                             \
  |  |  |  |  212|      0|                if (BUILD_MODE_DEVELOPER)                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|      0|#define BUILD_MODE_DEVELOPER 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (23:30): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  213|      0|                        assert(!strstr(fmt, "%m"));                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|      0|        } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  214|      0|                (void) log_full_errno_zerook(level, 0, fmt, ##__VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|      0|        ({                                                              \
  |  |  |  |  |  |  190|      0|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|      0|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|      0|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|        })
  |  |  |  |  ------------------
  |  |  |  |  215|      0|        })
  |  |  ------------------
  ------------------
 1354|       |
 1355|    715|        e = getenv("SYSTEMD_LOG_TIME");
 1356|    715|        if (e && log_show_time_from_string(e) < 0)
  ------------------
  |  Branch (1356:13): [True: 0, False: 715]
  |  Branch (1356:18): [True: 0, False: 0]
  ------------------
 1357|    715|                log_warning("Failed to parse log time '%s', ignoring.", e);
  ------------------
  |  |  223|      0|#define log_warning(...)   log_full(LOG_WARNING, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  211|      0|        ({                                                             \
  |  |  |  |  212|      0|                if (BUILD_MODE_DEVELOPER)                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|      0|#define BUILD_MODE_DEVELOPER 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (23:30): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  213|      0|                        assert(!strstr(fmt, "%m"));                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|      0|        } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  214|      0|                (void) log_full_errno_zerook(level, 0, fmt, ##__VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|      0|        ({                                                              \
  |  |  |  |  |  |  190|      0|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|      0|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|      0|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|        })
  |  |  |  |  ------------------
  |  |  |  |  215|      0|        })
  |  |  ------------------
  ------------------
 1358|       |
 1359|    715|        e = getenv("SYSTEMD_LOG_TID");
 1360|    715|        if (e && log_show_tid_from_string(e) < 0)
  ------------------
  |  Branch (1360:13): [True: 0, False: 715]
  |  Branch (1360:18): [True: 0, False: 0]
  ------------------
 1361|    715|                log_warning("Failed to parse log tid '%s', ignoring.", e);
  ------------------
  |  |  223|      0|#define log_warning(...)   log_full(LOG_WARNING, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  211|      0|        ({                                                             \
  |  |  |  |  212|      0|                if (BUILD_MODE_DEVELOPER)                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|      0|#define BUILD_MODE_DEVELOPER 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (23:30): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  213|      0|                        assert(!strstr(fmt, "%m"));                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|      0|        } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  214|      0|                (void) log_full_errno_zerook(level, 0, fmt, ##__VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|      0|        ({                                                              \
  |  |  |  |  |  |  190|      0|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|      0|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|      0|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|        })
  |  |  |  |  ------------------
  |  |  |  |  215|      0|        })
  |  |  ------------------
  ------------------
 1362|       |
 1363|    715|        e = getenv("SYSTEMD_LOG_RATELIMIT_KMSG");
 1364|    715|        if (e && log_set_ratelimit_kmsg_from_string(e) < 0)
  ------------------
  |  Branch (1364:13): [True: 0, False: 715]
  |  Branch (1364:18): [True: 0, False: 0]
  ------------------
 1365|    715|                log_warning("Failed to parse log ratelimit kmsg boolean '%s', ignoring.", e);
  ------------------
  |  |  223|      0|#define log_warning(...)   log_full(LOG_WARNING, __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  211|      0|        ({                                                             \
  |  |  |  |  212|      0|                if (BUILD_MODE_DEVELOPER)                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|      0|#define BUILD_MODE_DEVELOPER 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (23:30): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  213|      0|                        assert(!strstr(fmt, "%m"));                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      0|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|      0|        do {                                                            \
  |  |  |  |  |  |  |  |   59|      0|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   95|      0|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      0|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   61|      0|        } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  214|      0|                (void) log_full_errno_zerook(level, 0, fmt, ##__VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|      0|        ({                                                              \
  |  |  |  |  |  |  190|      0|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|      0|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|      0|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  172|      0|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|        })
  |  |  |  |  ------------------
  |  |  |  |  215|      0|        })
  |  |  ------------------
  ------------------
 1366|    715|}
log_parse_environment:
 1368|    715|void log_parse_environment(void) {
 1369|       |        /* Do not call from library code. */
 1370|       |
 1371|    715|        if (should_parse_proc_cmdline())
  ------------------
  |  Branch (1371:13): [True: 0, False: 715]
  ------------------
 1372|      0|                (void) proc_cmdline_parse(parse_proc_cmdline_item, NULL, PROC_CMDLINE_STRIP_RD_PREFIX);
 1373|       |
 1374|    715|        log_parse_environment_variables();
 1375|    715|}
log_show_color:
 1409|      1|void log_show_color(bool b) {
 1410|      1|        show_color = b;
 1411|      1|}
log_on_console:
 1485|    715|bool log_on_console(void) {
 1486|    715|        if (IN_SET(log_target, LOG_TARGET_CONSOLE,
  ------------------
  |  |  361|    715|        ({                                                              \
  |  |  ------------------
  |  |  |  Branch (361:9): [True: 0, False: 715]
  |  |  ------------------
  |  |  362|    715|                bool _found = false;                                    \
  |  |  363|    715|                /* If the build breaks in the line below, you need to extend the case macros. We use typeof(+x) \
  |  |  364|    715|                 * here to widen the type of x if it is a bit-field as this would otherwise be illegal. */      \
  |  |  365|    715|                static const typeof(+x) __assert_in_set[] _unused_ = { first, __VA_ARGS__ }; \
  |  |  366|    715|                assert_cc(ELEMENTSOF(__assert_in_set) <= 20);           \
  |  |  ------------------
  |  |  |  |  142|    715|#define assert_cc(expr) _Static_assert(expr, #expr)
  |  |  ------------------
  |  |  367|    715|                switch (x) {                                            \
  |  |  368|      0|                FOR_EACH_MAKE_CASE(first, __VA_ARGS__)                  \
  |  |  ------------------
  |  |  |  |  356|      0|        GET_CASE_F(__VA_ARGS__,CASE_F_20,CASE_F_19,CASE_F_18,CASE_F_17,CASE_F_16,CASE_F_15,CASE_F_14,CASE_F_13,CASE_F_12,CASE_F_11, \
  |  |  |  |  ------------------
  |  |  |  |  |  |  354|      0|#define GET_CASE_F(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,NAME,...) NAME
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  357|      0|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  334|      0|#define  CASE_F_2(X, ...) case X:  CASE_F_1( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  333|      0|#define  CASE_F_1(X)      case X:
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (333:27): [True: 0, False: 715]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (334:27): [True: 0, False: 715]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  357|      0|                               CASE_F_10,CASE_F_9,CASE_F_8,CASE_F_7,CASE_F_6,CASE_F_5,CASE_F_4,CASE_F_3,CASE_F_2,CASE_F_1) \
  |  |  |  |  358|      0|                   (__VA_ARGS__)
  |  |  ------------------
  |  |  369|      0|                        _found = true;                                  \
  |  |  370|      0|                        break;                                          \
  |  |  371|    715|                default:                                                \
  |  |  ------------------
  |  |  |  Branch (371:17): [True: 715, False: 0]
  |  |  ------------------
  |  |  372|    715|                        ;                                               \
  |  |  373|    715|                }                                                       \
  |  |  374|    715|                _found;                                                 \
  |  |  375|    715|        })
  ------------------
 1487|    715|                               LOG_TARGET_CONSOLE_PREFIXED))
 1488|      0|                return true;
 1489|       |
 1490|    715|        return syslog_fd < 0 && kmsg_fd < 0 && journal_fd < 0;
  ------------------
  |  Branch (1490:16): [True: 715, False: 0]
  |  Branch (1490:33): [True: 715, False: 0]
  |  Branch (1490:48): [True: 715, False: 0]
  ------------------
 1491|    715|}
log_setup:
 1714|    715|void log_setup(void) {
 1715|    715|        log_set_target(LOG_TARGET_AUTO);
 1716|    715|        log_parse_environment();
 1717|    715|        (void) log_open();
 1718|    715|        if (log_on_console() && show_color < 0)
  ------------------
  |  Branch (1718:13): [True: 715, False: 0]
  |  Branch (1718:33): [True: 1, False: 714]
  ------------------
 1719|      1|                log_show_color(true);
 1720|    715|}
log.c:log_close_journal:
  202|    715|static void log_close_journal(void) {
  203|       |        /* If the journal FD is bad, safe_close will fail, and will try to log, which will fail, so we'll
  204|       |         * try to close the journal FD, which is bad, so safe_close will fail... Whether we can close it
  205|       |         * or not, invalidate it immediately so that we don't get in a recursive loop until we run out of
  206|       |         * stack. */
  207|    715|        (void) safe_close(TAKE_FD(journal_fd));
  ------------------
  |  |   99|    715|#define TAKE_FD(fd) TAKE_GENERIC(fd, int, -EBADF)
  |  |  ------------------
  |  |  |  |  380|    715|        ({                                                       \
  |  |  |  |  381|    715|                type *_pvar_ = &(var);                           \
  |  |  |  |  382|    715|                type _var_ = *_pvar_;                            \
  |  |  |  |  383|    715|                type _nullvalue_ = nullvalue;                    \
  |  |  |  |  384|    715|                *_pvar_ = _nullvalue_;                           \
  |  |  |  |  385|    715|                _var_;                                           \
  |  |  |  |  386|    715|        })
  |  |  ------------------
  ------------------
  208|    715|}
log.c:log_close_syslog:
  136|    715|static void log_close_syslog(void) {
  137|       |        /* See comment in log_close_journal() */
  138|    715|        (void) safe_close(TAKE_FD(syslog_fd));
  ------------------
  |  |   99|    715|#define TAKE_FD(fd) TAKE_GENERIC(fd, int, -EBADF)
  |  |  ------------------
  |  |  |  |  380|    715|        ({                                                       \
  |  |  |  |  381|    715|                type *_pvar_ = &(var);                           \
  |  |  |  |  382|    715|                type _var_ = *_pvar_;                            \
  |  |  |  |  383|    715|                type _nullvalue_ = nullvalue;                    \
  |  |  |  |  384|    715|                *_pvar_ = _nullvalue_;                           \
  |  |  |  |  385|    715|                _var_;                                           \
  |  |  |  |  386|    715|        })
  |  |  ------------------
  ------------------
  139|    715|}
log.c:log_open_console:
   96|    715|static int log_open_console(void) {
   97|       |
   98|    715|        if (!always_reopen_console) {
  ------------------
  |  Branch (98:13): [True: 715, False: 0]
  ------------------
   99|    715|                console_fd = STDERR_FILENO;
  100|    715|                console_fd_is_tty = -1;
  101|    715|                return 0;
  102|    715|        }
  103|       |
  104|      0|        if (console_fd < 3) {
  ------------------
  |  Branch (104:13): [True: 0, False: 0]
  ------------------
  105|      0|                int fd;
  106|       |
  107|      0|                fd = open_terminal("/dev/console", O_WRONLY|O_NOCTTY|O_CLOEXEC);
  108|      0|                if (fd < 0)
  ------------------
  |  Branch (108:21): [True: 0, False: 0]
  ------------------
  109|      0|                        return fd;
  110|       |
  111|      0|                console_fd = fd_move_above_stdio(fd);
  112|      0|                console_fd_is_tty = true;
  113|      0|        }
  114|       |
  115|      0|        return 0;
  116|      0|}
log.c:should_parse_proc_cmdline:
 1312|    715|static bool should_parse_proc_cmdline(void) {
 1313|       |        /* PID1 always reads the kernel command line. */
 1314|    715|        if (getpid_cached() == 1)
  ------------------
  |  Branch (1314:13): [True: 0, False: 715]
  ------------------
 1315|      0|                return true;
 1316|       |
 1317|       |        /* Otherwise, parse the command line if invoked directly by systemd. */
 1318|    715|        return invoked_by_systemd();
 1319|    715|}

getpid_cached:
 1387|  1.43k|pid_t getpid_cached(void) {
 1388|  1.43k|        static bool installed = false;
 1389|  1.43k|        pid_t current_value = CACHED_PID_UNSET;
  ------------------
  |  | 1377|  1.43k|#define CACHED_PID_UNSET ((pid_t) 0)
  ------------------
 1390|       |
 1391|       |        /* getpid_cached() is much like getpid(), but caches the value in local memory, to avoid having to invoke a
 1392|       |         * system call each time. This restores glibc behaviour from before 2.24, when getpid() was unconditionally
 1393|       |         * cached. Starting with 2.24 getpid() started to become prohibitively expensive when used for detecting when
 1394|       |         * objects were used across fork()s. With this caching the old behaviour is somewhat restored.
 1395|       |         *
 1396|       |         * https://bugzilla.redhat.com/show_bug.cgi?id=1443976
 1397|       |         * https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c579f48edba88380635ab98cb612030e3ed8691e
 1398|       |         */
 1399|       |
 1400|  1.43k|        (void) __atomic_compare_exchange_n(
 1401|  1.43k|                        &cached_pid,
 1402|  1.43k|                        &current_value,
 1403|  1.43k|                        CACHED_PID_BUSY,
  ------------------
  |  | 1378|  1.43k|#define CACHED_PID_BUSY ((pid_t) -1)
  ------------------
 1404|  1.43k|                        false,
 1405|  1.43k|                        __ATOMIC_SEQ_CST,
 1406|  1.43k|                        __ATOMIC_SEQ_CST);
 1407|       |
 1408|  1.43k|        switch (current_value) {
 1409|       |
 1410|      1|        case CACHED_PID_UNSET: { /* Not initialized yet, then do so now */
  ------------------
  |  | 1377|      1|#define CACHED_PID_UNSET ((pid_t) 0)
  ------------------
  |  Branch (1410:9): [True: 1, False: 1.42k]
  ------------------
 1411|      1|                pid_t new_pid;
 1412|       |
 1413|      1|                new_pid = getpid();
 1414|       |
 1415|      1|                if (!installed) {
  ------------------
  |  Branch (1415:21): [True: 1, False: 0]
  ------------------
 1416|       |                        /* __register_atfork() either returns 0 or -ENOMEM, in its glibc implementation. Since it's
 1417|       |                         * only half-documented (glibc doesn't document it but LSB does — though only superficially)
 1418|       |                         * we'll check for errors only in the most generic fashion possible. */
 1419|       |
 1420|      1|                        if (pthread_atfork(NULL, NULL, reset_cached_pid) != 0) {
  ------------------
  |  Branch (1420:29): [True: 0, False: 1]
  ------------------
 1421|       |                                /* OOM? Let's try again later */
 1422|      0|                                cached_pid = CACHED_PID_UNSET;
  ------------------
  |  | 1377|      0|#define CACHED_PID_UNSET ((pid_t) 0)
  ------------------
 1423|      0|                                return new_pid;
 1424|      0|                        }
 1425|       |
 1426|      1|                        installed = true;
 1427|      1|                }
 1428|       |
 1429|      1|                cached_pid = new_pid;
 1430|      1|                return new_pid;
 1431|      1|        }
 1432|       |
 1433|      0|        case CACHED_PID_BUSY: /* Somebody else is currently initializing */
  ------------------
  |  | 1378|      0|#define CACHED_PID_BUSY ((pid_t) -1)
  ------------------
  |  Branch (1433:9): [True: 0, False: 1.43k]
  ------------------
 1434|      0|                return getpid();
 1435|       |
 1436|  1.42k|        default: /* Properly initialized */
  ------------------
  |  Branch (1436:9): [True: 1.42k, False: 1]
  ------------------
 1437|  1.42k|                return current_value;
 1438|  1.43k|        }
 1439|  1.43k|}

log_level_is_valid:
  101|    715|bool log_level_is_valid(int level) {
  102|    715|        return level >= 0 && level <= LOG_DEBUG;
  ------------------
  |  Branch (102:16): [True: 715, False: 0]
  |  Branch (102:30): [True: 715, False: 0]
  ------------------
  103|    715|}

unichar_is_valid:
   16|  2.12k|bool unichar_is_valid(char32_t ch) {
   17|       |
   18|  2.12k|        if (ch >= 0x110000) /* End of unicode space */
  ------------------
  |  Branch (18:13): [True: 49, False: 2.07k]
  ------------------
   19|     49|                return false;
   20|  2.07k|        if ((ch & 0xFFFFF800) == 0xD800) /* Reserved area for UTF-16 */
  ------------------
  |  Branch (20:13): [True: 1, False: 2.07k]
  ------------------
   21|      1|                return false;
   22|  2.07k|        if ((ch >= 0xFDD0) && (ch <= 0xFDEF)) /* Reserved */
  ------------------
  |  Branch (22:13): [True: 978, False: 1.09k]
  |  Branch (22:31): [True: 6, False: 972]
  ------------------
   23|      6|                return false;
   24|  2.06k|        if ((ch & 0xFFFE) == 0xFFFE) /* BOM (Byte Order Mark) */
  ------------------
  |  Branch (24:13): [True: 3, False: 2.06k]
  ------------------
   25|      3|                return false;
   26|       |
   27|  2.06k|        return true;
   28|  2.06k|}
utf8_encode_unichar:
  325|  72.9k|size_t utf8_encode_unichar(char *out_utf8, char32_t g) {
  326|       |
  327|  72.9k|        if (g < (1 << 7)) {
  ------------------
  |  Branch (327:13): [True: 52.3k, False: 20.5k]
  ------------------
  328|  52.3k|                if (out_utf8)
  ------------------
  |  Branch (328:21): [True: 52.3k, False: 0]
  ------------------
  329|  52.3k|                        out_utf8[0] = g & 0x7f;
  330|  52.3k|                return 1;
  331|  52.3k|        } else if (g < (1 << 11)) {
  ------------------
  |  Branch (331:20): [True: 3.91k, False: 16.6k]
  ------------------
  332|  3.91k|                if (out_utf8) {
  ------------------
  |  Branch (332:21): [True: 3.91k, False: 0]
  ------------------
  333|  3.91k|                        out_utf8[0] = 0xc0 | ((g >> 6) & 0x1f);
  334|  3.91k|                        out_utf8[1] = 0x80 | (g & 0x3f);
  335|  3.91k|                }
  336|  3.91k|                return 2;
  337|  16.6k|        } else if (g < (1 << 16)) {
  ------------------
  |  Branch (337:20): [True: 15.7k, False: 942]
  ------------------
  338|  15.7k|                if (out_utf8) {
  ------------------
  |  Branch (338:21): [True: 15.7k, False: 0]
  ------------------
  339|  15.7k|                        out_utf8[0] = 0xe0 | ((g >> 12) & 0x0f);
  340|  15.7k|                        out_utf8[1] = 0x80 | ((g >> 6) & 0x3f);
  341|  15.7k|                        out_utf8[2] = 0x80 | (g & 0x3f);
  342|  15.7k|                }
  343|  15.7k|                return 3;
  344|  15.7k|        } else if (g < (1 << 21)) {
  ------------------
  |  Branch (344:20): [True: 942, False: 0]
  ------------------
  345|    942|                if (out_utf8) {
  ------------------
  |  Branch (345:21): [True: 942, False: 0]
  ------------------
  346|    942|                        out_utf8[0] = 0xf0 | ((g >> 18) & 0x07);
  347|    942|                        out_utf8[1] = 0x80 | ((g >> 12) & 0x3f);
  348|    942|                        out_utf8[2] = 0x80 | ((g >> 6) & 0x3f);
  349|    942|                        out_utf8[3] = 0x80 | (g & 0x3f);
  350|    942|                }
  351|    942|                return 4;
  352|    942|        }
  353|       |
  354|      0|        return 0;
  355|  72.9k|}

escape.c:strlen_ptr:
   73|    594|static inline size_t strlen_ptr(const sd_char *s) {
   74|    594|        if (!s)
  ------------------
  |  Branch (74:13): [True: 594, False: 0]
  ------------------
   75|    594|                return 0;
   76|       |
   77|      0|        return strlen(s);
   78|    594|}

fuzz-udev-rule-parse-value.c:fuzz_setup_logging:
   32|    715|static inline void fuzz_setup_logging(void) {
   33|       |        /* We don't want to fill the logs and slow down stuff when running
   34|       |         * in a fuzzing mode, so disable most of the logging. */
   35|    715|        log_set_assert_return_is_critical(true);
   36|    715|        log_set_max_level(LOG_CRIT);
   37|    715|        log_setup();
   38|    715|}

LLVMFuzzerTestOneInput:
    9|    715|int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
   10|    715|        _cleanup_free_ char *str = NULL;
  ------------------
  |  |   82|    715|#define _cleanup_free_ _cleanup_(freep)
  |  |  ------------------
  |  |  |  |   78|    715|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
   11|    715|        int r;
   12|    715|        char *value = UINT_TO_PTR(0x12345678U);
  ------------------
  |  |   92|    715|#define UINT_TO_PTR(u) ((void *) ((uintptr_t) (u)))
  ------------------
   13|    715|        char *endpos = UINT_TO_PTR(0x87654321U);
  ------------------
  |  |   92|    715|#define UINT_TO_PTR(u) ((void *) ((uintptr_t) (u)))
  ------------------
   14|    715|        bool is_case_sensitive;
   15|       |
   16|    715|        fuzz_setup_logging();
   17|       |
   18|    715|        assert_se(str = malloc(size + 1));
  ------------------
  |  |   65|    715|#define assert_se(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|    715|        do {                                                            \
  |  |  |  |   59|    715|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|    715|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 715]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|    715|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|    715|        } while (false)
  |  |  ------------------
  ------------------
   19|    715|        memcpy(str, data, size);
   20|    715|        str[size] = '\0';
   21|       |
   22|    715|        r = udev_rule_parse_value(str, &value, &endpos, &is_case_sensitive);
   23|    715|        if (r < 0) {
  ------------------
  |  Branch (23:13): [True: 353, False: 362]
  ------------------
   24|       |                /* not modified on failure */
   25|    353|                assert_se(value == UINT_TO_PTR(0x12345678U));
  ------------------
  |  |   65|    353|#define assert_se(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|    353|        do {                                                            \
  |  |  |  |   59|    353|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|    353|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 353]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|    353|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|    353|        } while (false)
  |  |  ------------------
  ------------------
   26|    353|                assert_se(endpos == UINT_TO_PTR(0x87654321U));
  ------------------
  |  |   65|    353|#define assert_se(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|    353|        do {                                                            \
  |  |  |  |   59|    353|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|    353|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 353]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|    353|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|    353|        } while (false)
  |  |  ------------------
  ------------------
   27|    362|        } else {
   28|    362|                assert_se(endpos <= str + size);
  ------------------
  |  |   65|    362|#define assert_se(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|    362|        do {                                                            \
  |  |  |  |   59|    362|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|    362|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 362]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|    362|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|    362|        } while (false)
  |  |  ------------------
  ------------------
   29|    362|                assert_se(endpos > str + 1);
  ------------------
  |  |   65|    362|#define assert_se(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|    362|        do {                                                            \
  |  |  |  |   59|    362|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|    362|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 362]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|    362|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|    362|        } while (false)
  |  |  ------------------
  ------------------
   30|    362|        }
   31|       |
   32|    715|        return 0;
   33|    715|}

udev_rule_parse_value:
 1248|    715|int udev_rule_parse_value(char *str, char **ret_value, char **ret_endpos, bool *ret_is_case_insensitive) {
 1249|    715|        char *i, *j;
 1250|    715|        bool is_escaped = false, is_case_insensitive = false;
 1251|       |
 1252|    715|        assert(str);
  ------------------
  |  |   72|    715|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|    715|        do {                                                            \
  |  |  |  |   59|    715|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|    715|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 715]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|    715|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|    715|        } while (false)
  |  |  ------------------
  ------------------
 1253|    715|        assert(ret_value);
  ------------------
  |  |   72|    715|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|    715|        do {                                                            \
  |  |  |  |   59|    715|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|    715|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 715]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|    715|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|    715|        } while (false)
  |  |  ------------------
  ------------------
 1254|    715|        assert(ret_endpos);
  ------------------
  |  |   72|    715|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|    715|        do {                                                            \
  |  |  |  |   59|    715|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|    715|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 715]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|    715|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|    715|        } while (false)
  |  |  ------------------
  ------------------
 1255|    715|        assert(ret_is_case_insensitive);
  ------------------
  |  |   72|    715|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|    715|        do {                                                            \
  |  |  |  |   59|    715|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|    715|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 715]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|    715|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|    715|        } while (false)
  |  |  ------------------
  ------------------
 1256|       |
 1257|       |        /* check if string is prefixed with:
 1258|       |         * - "e" for escaped
 1259|       |         * - "i" for case insensitive match
 1260|       |         *
 1261|       |         * Note both e and i can be set but do not allow duplicates ("eei", "eii"). */
 1262|  1.36k|        for (const char *k = str; *k != '"' && k < str + 2; k++)
  ------------------
  |  Branch (1262:35): [True: 689, False: 680]
  |  Branch (1262:48): [True: 679, False: 10]
  ------------------
 1263|    679|                if (*k == 'e' && !is_escaped)
  ------------------
  |  Branch (1263:21): [True: 643, False: 36]
  |  Branch (1263:34): [True: 642, False: 1]
  ------------------
 1264|    642|                        is_escaped = true;
 1265|     37|                else if (*k == 'i' && !is_case_insensitive)
  ------------------
  |  Branch (1265:26): [True: 13, False: 24]
  |  Branch (1265:39): [True: 12, False: 1]
  ------------------
 1266|     12|                        is_case_insensitive = true;
 1267|     25|                else
 1268|     25|                        return -EINVAL;
 1269|       |
 1270|       |        /* value must be double quotated */
 1271|    690|        str += is_escaped + is_case_insensitive;
 1272|    690|        if (str[0] != '"')
  ------------------
  |  Branch (1272:13): [True: 10, False: 680]
  ------------------
 1273|     10|                return -EINVAL;
 1274|       |
 1275|    680|        if (!is_escaped) {
  ------------------
  |  Branch (1275:13): [True: 50, False: 630]
  ------------------
 1276|       |                /* unescape double quotation '\"'->'"' */
 1277|    663|                for (j = str, i = str + 1; *i != '"'; i++, j++) {
  ------------------
  |  Branch (1277:44): [True: 661, False: 2]
  ------------------
 1278|    661|                        if (*i == '\0')
  ------------------
  |  Branch (1278:29): [True: 48, False: 613]
  ------------------
 1279|     48|                                return -EINVAL;
 1280|    613|                        if (i[0] == '\\' && i[1] == '"')
  ------------------
  |  Branch (1280:29): [True: 395, False: 218]
  |  Branch (1280:45): [True: 194, False: 201]
  ------------------
 1281|    194|                                i++;
 1282|    613|                        *j = *i;
 1283|    613|                }
 1284|      2|                j[0] = '\0';
 1285|       |                /*
 1286|       |                 * The return value must be terminated by two subsequent NULs
 1287|       |                 * so it could be safely interpreted as nulstr.
 1288|       |                 */
 1289|      2|                j[1] = '\0';
 1290|    630|        } else {
 1291|    630|                _cleanup_free_ char *unescaped = NULL;
  ------------------
  |  |   82|    630|#define _cleanup_free_ _cleanup_(freep)
  |  |  ------------------
  |  |  |  |   78|    630|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
 1292|    630|                ssize_t l;
 1293|       |
 1294|       |                /* find the end position of value */
 1295|  13.1M|                for (i = str + 1; *i != '"'; i++) {
  ------------------
  |  Branch (1295:35): [True: 13.1M, False: 594]
  ------------------
 1296|  13.1M|                        if (i[0] == '\\')
  ------------------
  |  Branch (1296:29): [True: 443k, False: 12.7M]
  ------------------
 1297|   443k|                                i++;
 1298|  13.1M|                        if (*i == '\0')
  ------------------
  |  Branch (1298:29): [True: 36, False: 13.1M]
  ------------------
 1299|     36|                                return -EINVAL;
 1300|  13.1M|                }
 1301|    594|                i[0] = '\0';
 1302|       |
 1303|    594|                l = cunescape_length(str + 1, i - (str + 1), 0, &unescaped);
 1304|    594|                if (l < 0)
  ------------------
  |  Branch (1304:21): [True: 234, False: 360]
  ------------------
 1305|    234|                        return l;
 1306|       |
 1307|    360|                assert(l <= i - (str + 1));
  ------------------
  |  |   72|    360|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|    360|        do {                                                            \
  |  |  |  |   59|    360|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|    360|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 360]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|    360|                        log_assert_failed(message, PROJECT_FILE, __LINE__, __func__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  472|      0|#define PROJECT_FILE (&__FILE__[STRLEN(RELATIVE_SOURCE_PATH) + 1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  397|      0|#define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0])))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   61|    360|        } while (false)
  |  |  ------------------
  ------------------
 1308|    360|                memcpy(str, unescaped, l + 1);
 1309|       |                /*
 1310|       |                 * The return value must be terminated by two subsequent NULs
 1311|       |                 * so it could be safely interpreted as nulstr.
 1312|       |                 */
 1313|    360|                str[l + 1] = '\0';
 1314|    360|        }
 1315|       |
 1316|    362|        *ret_value = str;
 1317|    362|        *ret_endpos = i + 1;
 1318|    362|        *ret_is_case_insensitive = is_case_insensitive;
 1319|    362|        return 0;
 1320|    680|}

