memdup_suffix0:
   19|  1.91k|void* memdup_suffix0(const void *p, size_t l) {
   20|  1.91k|        void *ret;
   21|       |
   22|  1.91k|        assert(l == 0 || p);
  ------------------
  |  |   72|  1.91k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.91k|        do {                                                            \
  |  |  |  |   59|  1.91k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  3.82k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.91k]
  |  |  |  |  |  |  |  Branch (95:44): [True: 0, False: 1.91k]
  |  |  |  |  |  |  |  Branch (95:44): [True: 1.91k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.91k|                        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|  1.91k|        } while (false)
  |  |  ------------------
  ------------------
   23|       |
   24|       |        /* The same as memdup() but place a safety NUL byte after the allocated memory */
   25|       |
   26|  1.91k|        if (_unlikely_(l == SIZE_MAX)) /* prevent overflow */
  ------------------
  |  |   95|  1.91k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  ------------------
  |  |  |  Branch (95:23): [True: 0, False: 1.91k]
  |  |  ------------------
  ------------------
   27|      0|                return NULL;
   28|       |
   29|  1.91k|        ret = malloc(l + 1);
   30|  1.91k|        if (!ret)
  ------------------
  |  Branch (30:13): [True: 0, False: 1.91k]
  ------------------
   31|      0|                return NULL;
   32|       |
   33|  1.91k|        ((uint8_t*) ret)[l] = 0;
   34|  1.91k|        return memcpy_safe(ret, p, l);
   35|  1.91k|}

fuzz-time-util.c:freep:
   78|  1.91k|static inline void freep(void *p) {
   79|  1.91k|        *(void**)p = mfree(*(void**) p);
  ------------------
  |  |  404|  1.91k|        ({                                      \
  |  |  405|  1.91k|                free(memory);                   \
  |  |  406|  1.91k|                (typeof(memory)) NULL;          \
  |  |  407|  1.91k|        })
  ------------------
   80|  1.91k|}
log.c:freep:
   78|  1.91k|static inline void freep(void *p) {
   79|  1.91k|        *(void**)p = mfree(*(void**) p);
  ------------------
  |  |  404|  1.91k|        ({                                      \
  |  |  405|  1.91k|                free(memory);                   \
  |  |  406|  1.91k|                (typeof(memory)) NULL;          \
  |  |  407|  1.91k|        })
  ------------------
   80|  1.91k|}
process-util.c:freep:
   78|     65|static inline void freep(void *p) {
   79|     65|        *(void**)p = mfree(*(void**) p);
   80|     65|}
time-util.c:freep:
   78|  2.02k|static inline void freep(void *p) {
   79|  2.02k|        *(void**)p = mfree(*(void**) p);
  ------------------
  |  |  404|  2.02k|        ({                                      \
  |  |  405|  2.02k|                free(memory);                   \
  |  |  406|  2.02k|                (typeof(memory)) NULL;          \
  |  |  407|  2.02k|        })
  ------------------
   80|  2.02k|}

invoked_by_systemd:
   41|  1.91k|bool invoked_by_systemd(void) {
   42|  1.91k|        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|  1.91k|        const char *e = getenv("SYSTEMD_EXEC_PID");
   47|  1.91k|        if (!e)
  ------------------
  |  Branch (47:13): [True: 1.91k, False: 0]
  ------------------
   48|  1.91k|                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|  1.91k|void log_set_assert_return_is_critical(bool b) {
   17|  1.91k|        assert_return_is_critical = b;
   18|  1.91k|}

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

fd-util.c:_reset_errno_:
   23|     70|static inline void _reset_errno_(int *saved_errno) {
   24|     70|        if (*saved_errno < 0) /* Invalidated by UNPROTECT_ERRNO? */
  ------------------
  |  Branch (24:13): [True: 0, False: 70]
  ------------------
   25|      0|                return;
   26|       |
   27|     70|        errno = *saved_errno;
   28|     70|}
log.c:_reset_errno_:
   23|  1.91k|static inline void _reset_errno_(int *saved_errno) {
   24|  1.91k|        if (*saved_errno < 0) /* Invalidated by UNPROTECT_ERRNO? */
  ------------------
  |  Branch (24:13): [True: 0, False: 1.91k]
  ------------------
   25|      0|                return;
   26|       |
   27|  1.91k|        errno = *saved_errno;
   28|  1.91k|}
pidref.c:RET_NERRNO:
   58|     65|static inline int RET_NERRNO(int ret) {
   59|       |
   60|       |        /* Helper to wrap system calls in to make them return negative errno errors. This brings system call
   61|       |         * error handling in sync with how we usually handle errors in our own code, i.e. with immediate
   62|       |         * returning of negative errno. Usage is like this:
   63|       |         *
   64|       |         *     …
   65|       |         *     r = RET_NERRNO(unlink(t));
   66|       |         *     …
   67|       |         *
   68|       |         * or
   69|       |         *
   70|       |         *     …
   71|       |         *     fd = RET_NERRNO(open("/etc/fstab", O_RDONLY|O_CLOEXEC));
   72|       |         *     …
   73|       |         */
   74|       |
   75|     65|        if (ret < 0)
  ------------------
  |  Branch (75:13): [True: 0, False: 65]
  ------------------
   76|      0|                return negative_errno();
   77|       |
   78|     65|        return ret;
   79|     65|}

close_nointr:
   35|     70|int close_nointr(int fd) {
   36|     70|        assert(fd >= 0);
  ------------------
  |  |   72|     70|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|     70|        do {                                                            \
  |  |  |  |   59|     70|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|     70|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 70]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|     70|                        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|     70|        } while (false)
  |  |  ------------------
  ------------------
   37|       |
   38|     70|        if (close(fd) >= 0)
  ------------------
  |  Branch (38:13): [True: 70, False: 0]
  ------------------
   39|     70|                return 0;
   40|       |
   41|       |        /*
   42|       |         * Just ignore EINTR; a retry loop is the wrong thing to do on
   43|       |         * Linux.
   44|       |         *
   45|       |         * http://lkml.indiana.edu/hypermail/linux/kernel/0509.1/0877.html
   46|       |         * https://bugzilla.gnome.org/show_bug.cgi?id=682819
   47|       |         * http://utcc.utoronto.ca/~cks/space/blog/unix/CloseEINTR
   48|       |         * https://sites.google.com/site/michaelsafyan/software-engineering/checkforeintrwheninvokingclosethinkagain
   49|       |         */
   50|      0|        if (errno == EINTR)
  ------------------
  |  Branch (50:13): [True: 0, False: 0]
  ------------------
   51|      0|                return 0;
   52|       |
   53|      0|        return -errno;
   54|      0|}
safe_close:
   56|  6.09k|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|  6.09k|        if (fd >= 0) {
  ------------------
  |  Branch (64:13): [True: 70, False: 6.02k]
  ------------------
   65|     70|                PROTECT_ERRNO;
  ------------------
  |  |   31|     70|        _cleanup_(_reset_errno_) _unused_ int _saved_errno_ = errno
  |  |  ------------------
  |  |  |  |   78|     70|#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|     70|                assert_se(close_nointr(fd) != -EBADF);
  ------------------
  |  |   65|     70|#define assert_se(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|     70|        do {                                                            \
  |  |  |  |   59|     70|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|     70|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 70]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|     70|                        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|     70|        } while (false)
  |  |  ------------------
  ------------------
   73|     70|        }
   74|       |
   75|  6.09k|        return -EBADF;
   76|  6.09k|}
safe_close_pair:
   78|     65|void safe_close_pair(int p[static 2]) {
   79|     65|        assert(p);
  ------------------
  |  |   72|     65|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|     65|        do {                                                            \
  |  |  |  |   59|     65|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|     65|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 65]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|     65|                        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|     65|        } while (false)
  |  |  ------------------
  ------------------
   80|       |
   81|     65|        if (p[0] == p[1]) {
  ------------------
  |  Branch (81:13): [True: 65, False: 0]
  ------------------
   82|       |                /* Special case pairs which use the same fd in both
   83|       |                 * directions... */
   84|     65|                p[0] = p[1] = safe_close(p[0]);
   85|     65|                return;
   86|     65|        }
   87|       |
   88|      0|        p[0] = safe_close(p[0]);
   89|      0|        p[1] = safe_close(p[1]);
   90|      0|}

process-util.c:close_pairp:
   49|     65|static inline void close_pairp(int (*p)[2]) {
   50|     65|        safe_close_pair(*p);
   51|     65|}
time-util.c:closep:
   45|  2.14k|static inline void closep(int *fd) {
   46|  2.14k|        safe_close(*fd);
   47|  2.14k|}

loop_read:
   52|     68|ssize_t loop_read(int fd, void *buf, size_t nbytes, bool do_poll) {
   53|     68|        uint8_t *p = ASSERT_PTR(buf);
  ------------------
  |  |   81|     68|#define ASSERT_PTR(expr) _ASSERT_PTR(expr, UNIQ_T(_expr_, UNIQ), assert)
  |  |  ------------------
  |  |  |  |   84|     68|        ({                                 \
  |  |  |  |   85|     68|                typeof(expr) var = (expr); \
  |  |  |  |   86|     68|                check(var);                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   81|     68|#define ASSERT_PTR(expr) _ASSERT_PTR(expr, UNIQ_T(_expr_, UNIQ), assert)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   72|     68|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   58|     68|        do {                                                            \
  |  |  |  |  |  |  |  |  |  |   59|     68|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   95|     68|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 68]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   60|     68|                        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|     68|        } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   87|     68|                var;                       \
  |  |  |  |   88|     68|        })
  |  |  ------------------
  ------------------
   54|     68|        ssize_t n = 0;
   55|       |
   56|     68|        assert(fd >= 0);
  ------------------
  |  |   72|     68|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|     68|        do {                                                            \
  |  |  |  |   59|     68|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|     68|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 68]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|     68|                        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|     68|        } while (false)
  |  |  ------------------
  ------------------
   57|       |
   58|       |        /* If called with nbytes == 0, let's call read() at least once, to validate the operation */
   59|       |
   60|     68|        if (nbytes > (size_t) SSIZE_MAX)
  ------------------
  |  Branch (60:13): [True: 0, False: 68]
  ------------------
   61|      0|                return -EINVAL;
   62|       |
   63|     68|        do {
   64|     68|                ssize_t k;
   65|       |
   66|     68|                k = read(fd, p, nbytes);
   67|     68|                if (k < 0) {
  ------------------
  |  Branch (67:21): [True: 0, False: 68]
  ------------------
   68|      0|                        if (errno == EINTR)
  ------------------
  |  Branch (68:29): [True: 0, False: 0]
  ------------------
   69|      0|                                continue;
   70|       |
   71|      0|                        if (errno == EAGAIN && do_poll) {
  ------------------
  |  Branch (71:29): [True: 0, False: 0]
  |  Branch (71:48): [True: 0, False: 0]
  ------------------
   72|       |
   73|       |                                /* We knowingly ignore any return value here,
   74|       |                                 * and expect that any error/EOF is reported
   75|       |                                 * via read() */
   76|       |
   77|      0|                                (void) fd_wait_for_event(fd, POLLIN, USEC_INFINITY);
  ------------------
  |  |   35|      0|#define USEC_INFINITY ((usec_t) UINT64_MAX)
  ------------------
   78|      0|                                continue;
   79|      0|                        }
   80|       |
   81|      0|                        return n > 0 ? n : -errno;
  ------------------
  |  Branch (81:32): [True: 0, False: 0]
  ------------------
   82|      0|                }
   83|       |
   84|     68|                if (k == 0)
  ------------------
  |  Branch (84:21): [True: 0, False: 68]
  ------------------
   85|      0|                        return n;
   86|       |
   87|     68|                assert((size_t) k <= nbytes);
  ------------------
  |  |   72|     68|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|     68|        do {                                                            \
  |  |  |  |   59|     68|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|     68|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 68]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|     68|                        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|     68|        } while (false)
  |  |  ------------------
  ------------------
   88|     68|                assert(k <= SSIZE_MAX - n);
  ------------------
  |  |   72|     68|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|     68|        do {                                                            \
  |  |  |  |   59|     68|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|     68|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 68]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|     68|                        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|     68|        } while (false)
  |  |  ------------------
  ------------------
   89|       |
   90|     68|                p += k;
   91|     68|                nbytes -= k;
   92|     68|                n += k;
   93|     68|        } while (nbytes > 0);
  ------------------
  |  Branch (93:18): [True: 0, False: 68]
  ------------------
   94|       |
   95|     68|        return n;
   96|     68|}
loop_read_exact:
   98|     68|int loop_read_exact(int fd, void *buf, size_t nbytes, bool do_poll) {
   99|     68|        ssize_t n;
  100|       |
  101|     68|        n = loop_read(fd, buf, nbytes, do_poll);
  102|     68|        if (n < 0)
  ------------------
  |  Branch (102:13): [True: 0, False: 68]
  ------------------
  103|      0|                return (int) n;
  104|     68|        if ((size_t) n != nbytes)
  ------------------
  |  Branch (104:13): [True: 0, False: 68]
  ------------------
  105|      0|                return -EIO;
  106|       |
  107|     68|        return 0;
  108|     68|}

stderr_is_journal:
  233|  1.91k|bool stderr_is_journal(void) {
  234|  1.91k|        _cleanup_free_ char *w = NULL;
  ------------------
  |  |   82|  1.91k|#define _cleanup_free_ _cleanup_(freep)
  |  |  ------------------
  |  |  |  |   78|  1.91k|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
  235|  1.91k|        const char *e;
  236|  1.91k|        uint64_t dev, ino;
  237|  1.91k|        struct stat st;
  238|       |
  239|  1.91k|        e = getenv("JOURNAL_STREAM");
  240|  1.91k|        if (!e)
  ------------------
  |  Branch (240:13): [True: 1.91k, False: 0]
  ------------------
  241|  1.91k|                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|  1.91k|int log_open(void) {
  260|  1.91k|        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|  1.91k|        PROTECT_ERRNO;
  ------------------
  |  |   31|  1.91k|        _cleanup_(_reset_errno_) _unused_ int _saved_errno_ = errno
  |  |  ------------------
  |  |  |  |   78|  1.91k|#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|  1.91k|        if (log_target == LOG_TARGET_NULL) {
  ------------------
  |  Branch (274:13): [True: 0, False: 1.91k]
  ------------------
  275|      0|                log_close_journal();
  276|      0|                log_close_syslog();
  277|      0|                log_close_console();
  278|      0|                return 0;
  279|      0|        }
  280|       |
  281|  1.91k|        if (getpid_cached() == 1 ||
  ------------------
  |  Branch (281:13): [True: 0, False: 1.91k]
  ------------------
  282|  1.91k|            stderr_is_journal() ||
  ------------------
  |  Branch (282:13): [True: 0, False: 1.91k]
  ------------------
  283|  1.91k|            IN_SET(log_target,
  ------------------
  |  |  361|  1.91k|        ({                                                              \
  |  |  ------------------
  |  |  |  Branch (361:9): [True: 0, False: 1.91k]
  |  |  ------------------
  |  |  362|  1.91k|                bool _found = false;                                    \
  |  |  363|  1.91k|                /* If the build breaks in the line below, you need to extend the case macros. We use typeof(+x) \
  |  |  364|  1.91k|                 * here to widen the type of x if it is a bit-field as this would otherwise be illegal. */      \
  |  |  365|  1.91k|                static const typeof(+x) __assert_in_set[] _unused_ = { first, __VA_ARGS__ }; \
  |  |  366|  1.91k|                assert_cc(ELEMENTSOF(__assert_in_set) <= 20);           \
  |  |  ------------------
  |  |  |  |  142|  1.91k|#define assert_cc(expr) _Static_assert(expr, #expr)
  |  |  ------------------
  |  |  367|  1.91k|                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: 1.91k]
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (334:27): [True: 0, False: 1.91k]
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (335:27): [True: 0, False: 1.91k]
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (336:27): [True: 0, False: 1.91k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (337:27): [True: 0, False: 1.91k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  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|  1.91k|                default:                                                \
  |  |  ------------------
  |  |  |  Branch (371:17): [True: 1.91k, False: 0]
  |  |  ------------------
  |  |  372|  1.91k|                        ;                                               \
  |  |  373|  1.91k|                }                                                       \
  |  |  374|  1.91k|                _found;                                                 \
  |  |  375|  1.91k|        })
  ------------------
  284|  1.91k|                   LOG_TARGET_KMSG,
  285|  1.91k|                   LOG_TARGET_JOURNAL,
  286|  1.91k|                   LOG_TARGET_JOURNAL_OR_KMSG,
  287|  1.91k|                   LOG_TARGET_SYSLOG,
  288|  1.91k|                   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|  1.91k|        log_close_journal();
  332|  1.91k|        log_close_syslog();
  333|       |
  334|  1.91k|        return log_open_console();
  335|  1.91k|}
log_set_target:
  337|  1.91k|void log_set_target(LogTarget target) {
  338|  1.91k|        assert(target >= 0);
  ------------------
  |  |   72|  1.91k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.91k|        do {                                                            \
  |  |  |  |   59|  1.91k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.91k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.91k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.91k|                        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|  1.91k|        } while (false)
  |  |  ------------------
  ------------------
  339|  1.91k|        assert(target < _LOG_TARGET_MAX);
  ------------------
  |  |   72|  1.91k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.91k|        do {                                                            \
  |  |  |  |   59|  1.91k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.91k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.91k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.91k|                        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|  1.91k|        } while (false)
  |  |  ------------------
  ------------------
  340|       |
  341|  1.91k|        if (upgrade_syslog_to_journal) {
  ------------------
  |  Branch (341:13): [True: 0, False: 1.91k]
  ------------------
  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|  1.91k|        log_target = target;
  349|  1.91k|}
log_set_max_level:
  372|  1.91k|int log_set_max_level(int level) {
  373|  1.91k|        assert(level == LOG_NULL || log_level_is_valid(level));
  ------------------
  |  |   72|  1.91k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.91k|        do {                                                            \
  |  |  |  |   59|  1.91k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  3.82k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.91k]
  |  |  |  |  |  |  |  Branch (95:44): [True: 0, False: 1.91k]
  |  |  |  |  |  |  |  Branch (95:44): [True: 1.91k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.91k|                        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|  1.91k|        } while (false)
  |  |  ------------------
  ------------------
  374|       |
  375|  1.91k|        int old = log_max_level;
  376|  1.91k|        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|  1.91k|        setlogmask(LOG_UPTO(level));
  385|       |
  386|       |        /* Ensure that our own LOG_NULL define maps sanely to the log mask */
  387|  1.91k|        assert_cc(LOG_UPTO(LOG_NULL) == 0);
  ------------------
  |  |  142|  1.91k|#define assert_cc(expr) _Static_assert(expr, #expr)
  ------------------
  388|       |
  389|  1.91k|        return old;
  390|  1.91k|}
log_parse_environment_variables:
 1321|  1.91k|void log_parse_environment_variables(void) {
 1322|  1.91k|        const char *e;
 1323|  1.91k|        int r;
 1324|       |
 1325|  1.91k|        e = getenv("SYSTEMD_LOG_TARGET");
 1326|  1.91k|        if (e && log_set_target_from_string(e) < 0)
  ------------------
  |  Branch (1326:13): [True: 0, False: 1.91k]
  |  Branch (1326:18): [True: 0, False: 0]
  ------------------
 1327|  1.91k|                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|  1.91k|        e = getenv("SYSTEMD_LOG_LEVEL");
 1330|  1.91k|        if (e) {
  ------------------
  |  Branch (1330:13): [True: 0, False: 1.91k]
  ------------------
 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|  1.91k|        } 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|  1.91k|                r = getenv_bool("DEBUG_INVOCATION");
 1341|  1.91k|                if (r < 0 && r != -ENXIO)
  ------------------
  |  Branch (1341:21): [True: 1.91k, False: 0]
  |  Branch (1341:30): [True: 0, False: 1.91k]
  ------------------
 1342|  1.91k|                        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|  1.91k|                else if (r > 0)
  ------------------
  |  Branch (1343:26): [True: 0, False: 1.91k]
  ------------------
 1344|      0|                        log_set_max_level(LOG_DEBUG);
 1345|  1.91k|        }
 1346|       |
 1347|  1.91k|        e = getenv("SYSTEMD_LOG_COLOR");
 1348|  1.91k|        if (e && log_show_color_from_string(e) < 0)
  ------------------
  |  Branch (1348:13): [True: 0, False: 1.91k]
  |  Branch (1348:18): [True: 0, False: 0]
  ------------------
 1349|  1.91k|                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|  1.91k|        e = getenv("SYSTEMD_LOG_LOCATION");
 1352|  1.91k|        if (e && log_show_location_from_string(e) < 0)
  ------------------
  |  Branch (1352:13): [True: 0, False: 1.91k]
  |  Branch (1352:18): [True: 0, False: 0]
  ------------------
 1353|  1.91k|                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|  1.91k|        e = getenv("SYSTEMD_LOG_TIME");
 1356|  1.91k|        if (e && log_show_time_from_string(e) < 0)
  ------------------
  |  Branch (1356:13): [True: 0, False: 1.91k]
  |  Branch (1356:18): [True: 0, False: 0]
  ------------------
 1357|  1.91k|                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|  1.91k|        e = getenv("SYSTEMD_LOG_TID");
 1360|  1.91k|        if (e && log_show_tid_from_string(e) < 0)
  ------------------
  |  Branch (1360:13): [True: 0, False: 1.91k]
  |  Branch (1360:18): [True: 0, False: 0]
  ------------------
 1361|  1.91k|                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|  1.91k|        e = getenv("SYSTEMD_LOG_RATELIMIT_KMSG");
 1364|  1.91k|        if (e && log_set_ratelimit_kmsg_from_string(e) < 0)
  ------------------
  |  Branch (1364:13): [True: 0, False: 1.91k]
  |  Branch (1364:18): [True: 0, False: 0]
  ------------------
 1365|  1.91k|                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|  1.91k|}
log_parse_environment:
 1368|  1.91k|void log_parse_environment(void) {
 1369|       |        /* Do not call from library code. */
 1370|       |
 1371|  1.91k|        if (should_parse_proc_cmdline())
  ------------------
  |  Branch (1371:13): [True: 0, False: 1.91k]
  ------------------
 1372|      0|                (void) proc_cmdline_parse(parse_proc_cmdline_item, NULL, PROC_CMDLINE_STRIP_RD_PREFIX);
 1373|       |
 1374|  1.91k|        log_parse_environment_variables();
 1375|  1.91k|}
log_get_max_level:
 1399|    984|int log_get_max_level(void) {
 1400|    984|        return log_max_level;
 1401|    984|}
log_show_color:
 1409|      1|void log_show_color(bool b) {
 1410|      1|        show_color = b;
 1411|      1|}
log_on_console:
 1485|  1.91k|bool log_on_console(void) {
 1486|  1.91k|        if (IN_SET(log_target, LOG_TARGET_CONSOLE,
  ------------------
  |  |  361|  1.91k|        ({                                                              \
  |  |  ------------------
  |  |  |  Branch (361:9): [True: 0, False: 1.91k]
  |  |  ------------------
  |  |  362|  1.91k|                bool _found = false;                                    \
  |  |  363|  1.91k|                /* If the build breaks in the line below, you need to extend the case macros. We use typeof(+x) \
  |  |  364|  1.91k|                 * here to widen the type of x if it is a bit-field as this would otherwise be illegal. */      \
  |  |  365|  1.91k|                static const typeof(+x) __assert_in_set[] _unused_ = { first, __VA_ARGS__ }; \
  |  |  366|  1.91k|                assert_cc(ELEMENTSOF(__assert_in_set) <= 20);           \
  |  |  ------------------
  |  |  |  |  142|  1.91k|#define assert_cc(expr) _Static_assert(expr, #expr)
  |  |  ------------------
  |  |  367|  1.91k|                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: 1.91k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (334:27): [True: 0, False: 1.91k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  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|  1.91k|                default:                                                \
  |  |  ------------------
  |  |  |  Branch (371:17): [True: 1.91k, False: 0]
  |  |  ------------------
  |  |  372|  1.91k|                        ;                                               \
  |  |  373|  1.91k|                }                                                       \
  |  |  374|  1.91k|                _found;                                                 \
  |  |  375|  1.91k|        })
  ------------------
 1487|  1.91k|                               LOG_TARGET_CONSOLE_PREFIXED))
 1488|      0|                return true;
 1489|       |
 1490|  1.91k|        return syslog_fd < 0 && kmsg_fd < 0 && journal_fd < 0;
  ------------------
  |  Branch (1490:16): [True: 1.91k, False: 0]
  |  Branch (1490:33): [True: 1.91k, False: 0]
  |  Branch (1490:48): [True: 1.91k, False: 0]
  ------------------
 1491|  1.91k|}
log_setup:
 1714|  1.91k|void log_setup(void) {
 1715|  1.91k|        log_set_target(LOG_TARGET_AUTO);
 1716|  1.91k|        log_parse_environment();
 1717|  1.91k|        (void) log_open();
 1718|  1.91k|        if (log_on_console() && show_color < 0)
  ------------------
  |  Branch (1718:13): [True: 1.91k, False: 0]
  |  Branch (1718:33): [True: 1, False: 1.90k]
  ------------------
 1719|      1|                log_show_color(true);
 1720|  1.91k|}
log.c:log_close_journal:
  202|  1.91k|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|  1.91k|        (void) safe_close(TAKE_FD(journal_fd));
  ------------------
  |  |   99|  1.91k|#define TAKE_FD(fd) TAKE_GENERIC(fd, int, -EBADF)
  |  |  ------------------
  |  |  |  |  380|  1.91k|        ({                                                       \
  |  |  |  |  381|  1.91k|                type *_pvar_ = &(var);                           \
  |  |  |  |  382|  1.91k|                type _var_ = *_pvar_;                            \
  |  |  |  |  383|  1.91k|                type _nullvalue_ = nullvalue;                    \
  |  |  |  |  384|  1.91k|                *_pvar_ = _nullvalue_;                           \
  |  |  |  |  385|  1.91k|                _var_;                                           \
  |  |  |  |  386|  1.91k|        })
  |  |  ------------------
  ------------------
  208|  1.91k|}
log.c:log_close_syslog:
  136|  1.91k|static void log_close_syslog(void) {
  137|       |        /* See comment in log_close_journal() */
  138|  1.91k|        (void) safe_close(TAKE_FD(syslog_fd));
  ------------------
  |  |   99|  1.91k|#define TAKE_FD(fd) TAKE_GENERIC(fd, int, -EBADF)
  |  |  ------------------
  |  |  |  |  380|  1.91k|        ({                                                       \
  |  |  |  |  381|  1.91k|                type *_pvar_ = &(var);                           \
  |  |  |  |  382|  1.91k|                type _var_ = *_pvar_;                            \
  |  |  |  |  383|  1.91k|                type _nullvalue_ = nullvalue;                    \
  |  |  |  |  384|  1.91k|                *_pvar_ = _nullvalue_;                           \
  |  |  |  |  385|  1.91k|                _var_;                                           \
  |  |  |  |  386|  1.91k|        })
  |  |  ------------------
  ------------------
  139|  1.91k|}
log.c:log_open_console:
   96|  1.91k|static int log_open_console(void) {
   97|       |
   98|  1.91k|        if (!always_reopen_console) {
  ------------------
  |  Branch (98:13): [True: 1.91k, False: 0]
  ------------------
   99|  1.91k|                console_fd = STDERR_FILENO;
  100|  1.91k|                console_fd_is_tty = -1;
  101|  1.91k|                return 0;
  102|  1.91k|        }
  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|  1.91k|static bool should_parse_proc_cmdline(void) {
 1313|       |        /* PID1 always reads the kernel command line. */
 1314|  1.91k|        if (getpid_cached() == 1)
  ------------------
  |  Branch (1314:13): [True: 0, False: 1.91k]
  ------------------
 1315|      0|                return true;
 1316|       |
 1317|       |        /* Otherwise, parse the command line if invoked directly by systemd. */
 1318|  1.91k|        return invoked_by_systemd();
 1319|  1.91k|}

alloc-util.c:memcpy_safe:
   18|  1.91k|static inline void* memcpy_safe(void *dst, const void *src, size_t n) {
   19|  1.91k|        if (n == 0)
  ------------------
  |  Branch (19:13): [True: 0, False: 1.91k]
  ------------------
   20|      0|                return dst;
   21|  1.91k|        assert(src);
  ------------------
  |  |   72|  1.91k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.91k|        do {                                                            \
  |  |  |  |   59|  1.91k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.91k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.91k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.91k|                        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|  1.91k|        } while (false)
  |  |  ------------------
  ------------------
   22|  1.91k|        return memcpy(dst, src, n);
   23|  1.91k|}

parse_fractional_part_u:
  627|    136|int parse_fractional_part_u(const char **p, size_t digits, unsigned *res) {
  628|    136|        unsigned val = 0;
  629|    136|        const char *s;
  630|       |
  631|    136|        s = *p;
  632|       |
  633|       |        /* accept any number of digits, strtoull is limited to 19 */
  634|    474|        for (size_t i = 0; i < digits; i++, s++) {
  ------------------
  |  Branch (634:28): [True: 455, False: 19]
  ------------------
  635|    455|                if (!ascii_isdigit(*s)) {
  ------------------
  |  Branch (635:21): [True: 117, False: 338]
  ------------------
  636|    117|                        if (i == 0)
  ------------------
  |  Branch (636:29): [True: 28, False: 89]
  ------------------
  637|     28|                                return -EINVAL;
  638|       |
  639|       |                        /* too few digits, pad with 0 */
  640|    399|                        for (; i < digits; i++)
  ------------------
  |  Branch (640:32): [True: 310, False: 89]
  ------------------
  641|    310|                                val *= 10;
  642|       |
  643|     89|                        break;
  644|    117|                }
  645|       |
  646|    338|                val *= 10;
  647|    338|                val += *s - '0';
  648|    338|        }
  649|       |
  650|       |        /* maybe round up */
  651|    108|        if (*s >= '5' && *s <= '9')
  ------------------
  |  Branch (651:13): [True: 21, False: 87]
  |  Branch (651:26): [True: 5, False: 16]
  ------------------
  652|      5|                val++;
  653|       |
  654|    108|        s += strspn(s, DIGITS);
  ------------------
  |  |   20|    108|#define DIGITS              "0123456789"
  ------------------
  655|       |
  656|    108|        *p = s;
  657|    108|        *res = val;
  658|       |
  659|    108|        return 0;
  660|    136|}

pidref_done:
  222|     65|void pidref_done(PidRef *pidref) {
  223|     65|        assert(pidref);
  ------------------
  |  |   72|     65|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|     65|        do {                                                            \
  |  |  |  |   59|     65|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|     65|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 65]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|     65|                        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|     65|        } while (false)
  |  |  ------------------
  ------------------
  224|       |
  225|     65|        *pidref = (PidRef) {
  226|     65|                .fd = safe_close(pidref->fd),
  227|     65|        };
  228|     65|}
pidref_is_self:
  398|    130|bool pidref_is_self(PidRef *pidref) {
  399|    130|        if (!pidref_is_set(pidref))
  ------------------
  |  Branch (399:13): [True: 0, False: 130]
  ------------------
  400|      0|                return false;
  401|       |
  402|    130|        if (pidref_is_remote(pidref))
  ------------------
  |  Branch (402:13): [True: 0, False: 130]
  ------------------
  403|      0|                return false;
  404|       |
  405|    130|        if (pidref->pid != getpid_cached())
  ------------------
  |  Branch (405:13): [True: 130, False: 0]
  ------------------
  406|    130|                return false;
  407|       |
  408|       |        /* PID1 cannot exit, hence no point in comparing pidfd IDs, they can never change */
  409|      0|        if (pidref->pid == 1)
  ------------------
  |  Branch (409:13): [True: 0, False: 0]
  ------------------
  410|      0|                return true;
  411|       |
  412|       |        /* Also compare pidfd ID if we can get it */
  413|      0|        if (pidref_acquire_pidfd_id(pidref) < 0)
  ------------------
  |  Branch (413:13): [True: 0, False: 0]
  ------------------
  414|      0|                return true;
  415|       |
  416|      0|        uint64_t self_id;
  417|      0|        if (pidfd_get_inode_id_self_cached(&self_id) < 0)
  ------------------
  |  Branch (417:13): [True: 0, False: 0]
  ------------------
  418|      0|                return true;
  419|       |
  420|      0|        return pidref->fd_id == self_id;
  421|      0|}
pidref_wait:
  423|     65|int pidref_wait(PidRef *pidref, siginfo_t *ret, int options) {
  424|     65|        int r;
  425|       |
  426|     65|        if (!pidref_is_set(pidref))
  ------------------
  |  Branch (426:13): [True: 0, False: 65]
  ------------------
  427|      0|                return -ESRCH;
  428|       |
  429|     65|        if (pidref_is_remote(pidref))
  ------------------
  |  Branch (429:13): [True: 0, False: 65]
  ------------------
  430|      0|                return -EREMOTE;
  431|       |
  432|     65|        if (pidref->pid == 1 || pidref_is_self(pidref))
  ------------------
  |  Branch (432:13): [True: 0, False: 65]
  |  Branch (432:33): [True: 0, False: 65]
  ------------------
  433|      0|                return -ECHILD;
  434|       |
  435|     65|        siginfo_t si = {};
  436|     65|        if (pidref->fd >= 0)
  ------------------
  |  Branch (436:13): [True: 0, False: 65]
  ------------------
  437|      0|                r = RET_NERRNO(waitid(P_PIDFD, pidref->fd, &si, options));
  ------------------
  |  |   10|      0|#  define P_PIDFD 3
  ------------------
  438|     65|        else
  439|     65|                r = RET_NERRNO(waitid(P_PID, pidref->pid, &si, options));
  440|     65|        if (r < 0)
  ------------------
  |  Branch (440:13): [True: 0, False: 65]
  ------------------
  441|      0|                return r;
  442|       |
  443|     65|        if (ret)
  ------------------
  |  Branch (443:13): [True: 65, False: 0]
  ------------------
  444|     65|                *ret = si;
  445|       |
  446|     65|        return 0;
  447|     65|}
pidref_wait_for_terminate:
  449|     65|int pidref_wait_for_terminate(PidRef *pidref, siginfo_t *ret) {
  450|     65|        int r;
  451|       |
  452|     65|        for (;;) {
  453|     65|                r = pidref_wait(pidref, ret, WEXITED);
  454|     65|                if (r != -EINTR)
  ------------------
  |  Branch (454:21): [True: 65, False: 0]
  ------------------
  455|     65|                        return r;
  456|     65|        }
  457|     65|}

pidref.c:pidref_is_set:
   52|    390|static inline bool pidref_is_set(const PidRef *pidref) {
   53|    390|        return pidref && pidref->pid > 0;
  ------------------
  |  Branch (53:16): [True: 390, False: 0]
  |  Branch (53:26): [True: 390, False: 0]
  ------------------
   54|    390|}
pidref.c:pidref_is_remote:
   58|    195|static inline bool pidref_is_remote(const PidRef *pidref) {
   59|       |        /* If the fd is set to -EREMOTE we assume PidRef does not refer to a local PID, but on another
   60|       |         * machine (and we just got the PidRef initialized due to deserialization of some RPC message) */
   61|    195|        return pidref_is_set(pidref) && pidref->fd == -EREMOTE;
  ------------------
  |  Branch (61:16): [True: 195, False: 0]
  |  Branch (61:41): [True: 0, False: 195]
  ------------------
   62|    195|}
process-util.c:pidref_is_set:
   52|    130|static inline bool pidref_is_set(const PidRef *pidref) {
   53|    130|        return pidref && pidref->pid > 0;
  ------------------
  |  Branch (53:16): [True: 130, False: 0]
  |  Branch (53:26): [True: 130, False: 0]
  ------------------
   54|    130|}
process-util.c:pidref_is_remote:
   58|     65|static inline bool pidref_is_remote(const PidRef *pidref) {
   59|       |        /* If the fd is set to -EREMOTE we assume PidRef does not refer to a local PID, but on another
   60|       |         * machine (and we just got the PidRef initialized due to deserialization of some RPC message) */
   61|     65|        return pidref_is_set(pidref) && pidref->fd == -EREMOTE;
  ------------------
  |  Branch (61:16): [True: 65, False: 0]
  |  Branch (61:41): [True: 0, False: 65]
  ------------------
   62|     65|}

pidref_wait_for_terminate_and_check:
  867|     65|int pidref_wait_for_terminate_and_check(const char *name, PidRef *pidref, WaitFlags flags) {
  868|     65|        int r;
  869|       |
  870|     65|        if (!pidref_is_set(pidref))
  ------------------
  |  Branch (870:13): [True: 0, False: 65]
  ------------------
  871|      0|                return -ESRCH;
  872|     65|        if (pidref_is_remote(pidref))
  ------------------
  |  Branch (872:13): [True: 0, False: 65]
  ------------------
  873|      0|                return -EREMOTE;
  874|     65|        if (pidref->pid == 1 || pidref_is_self(pidref))
  ------------------
  |  Branch (874:13): [True: 0, False: 65]
  |  Branch (874:33): [True: 0, False: 65]
  ------------------
  875|      0|                return -ECHILD;
  876|       |
  877|     65|        _cleanup_free_ char *buffer = NULL;
  ------------------
  |  |   82|     65|#define _cleanup_free_ _cleanup_(freep)
  ------------------
  878|     65|        if (!name) {
  ------------------
  |  Branch (878:13): [True: 0, False: 65]
  ------------------
  879|      0|                r = pidref_get_comm(pidref, &buffer);
  880|      0|                if (r < 0)
  ------------------
  |  Branch (880:21): [True: 0, False: 0]
  ------------------
  881|      0|                        log_debug_errno(r, "Failed to acquire process name of " PID_FMT ", ignoring: %m", pidref->pid);
  ------------------
  |  |  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)
  |  |  |  |  ------------------
  |  |  |  |  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__) \
  |  |  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|        })
  |  |  |  |  ------------------
  |  |  |  |  208|      0|        })
  |  |  ------------------
  ------------------
  882|      0|                else
  883|      0|                        name = buffer;
  884|      0|        }
  885|       |
  886|     65|        int prio = flags & WAIT_LOG_ABNORMAL ? LOG_ERR : LOG_DEBUG;
  ------------------
  |  Branch (886:20): [True: 0, False: 65]
  ------------------
  887|       |
  888|     65|        siginfo_t status;
  889|     65|        r = pidref_wait_for_terminate(pidref, &status);
  890|     65|        if (r < 0)
  ------------------
  |  Branch (890:13): [True: 0, False: 65]
  ------------------
  891|      0|                return log_full_errno(prio, r, "Failed to wait for %s: %m", strna(name));
  ------------------
  |  |  204|      0|        ({                                                              \
  |  |  205|      0|                int _error = (error);                                   \
  |  |  206|      0|                ASSERT_NON_ZERO(_error);                                \
  |  |  ------------------
  |  |  |  |  198|      0|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  ------------------
  |  |  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__) \
  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  ------------------
  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  195|      0|        })
  |  |  ------------------
  |  |  208|      0|        })
  ------------------
  892|       |
  893|     65|        if (status.si_code == CLD_EXITED) {
  ------------------
  |  Branch (893:13): [True: 65, False: 0]
  ------------------
  894|     65|                if (status.si_status != EXIT_SUCCESS)
  ------------------
  |  Branch (894:21): [True: 0, False: 65]
  ------------------
  895|      0|                        log_full(flags & WAIT_LOG_NON_ZERO_EXIT_STATUS ? LOG_ERR : LOG_DEBUG,
  ------------------
  |  |  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"));                    \
  |  |  214|      0|                (void) log_full_errno_zerook(level, 0, fmt, ##__VA_ARGS__); \
  |  |  ------------------
  |  |  |  |  189|      0|        ({                                                              \
  |  |  |  |  190|      0|                int _level = (level), _e = (error);                     \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (190:31): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  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__) \
  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  ------------------
  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  195|      0|        })
  |  |  ------------------
  |  |  215|      0|        })
  ------------------
  896|     65|                                 "%s failed with exit status %i.", strna(name), status.si_status);
  897|     65|                else
  898|     65|                        log_debug("%s succeeded.", name);
  ------------------
  |  |  220|     65|#define log_debug(...)     log_full(LOG_DEBUG,   __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  211|     65|        ({                                                             \
  |  |  |  |  212|     65|                if (BUILD_MODE_DEVELOPER)                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|     65|#define BUILD_MODE_DEVELOPER 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (23:30): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  213|     65|                        assert(!strstr(fmt, "%m"));                    \
  |  |  |  |  214|     65|                (void) log_full_errno_zerook(level, 0, fmt, ##__VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|     65|        ({                                                              \
  |  |  |  |  |  |  190|     65|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|     65|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 65]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|     65|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  193|     65|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|    130|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|     65|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 65]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|     65|        })
  |  |  |  |  ------------------
  |  |  |  |  215|     65|        })
  |  |  ------------------
  ------------------
  899|       |
  900|     65|                return status.si_status;
  901|       |
  902|     65|        } else if (IN_SET(status.si_code, CLD_KILLED, CLD_DUMPED)) {
  903|       |
  904|      0|                log_full(prio, "%s terminated by signal %s.", strna(name), signal_to_string(status.si_status));
  ------------------
  |  |  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"));                    \
  |  |  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__) \
  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  ------------------
  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  195|      0|        })
  |  |  ------------------
  |  |  215|      0|        })
  ------------------
  905|      0|                return -EPROTO;
  906|      0|        }
  907|       |
  908|      0|        log_full(prio, "%s failed due to unknown reason.", strna(name));
  ------------------
  |  |  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"));                    \
  |  |  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__) \
  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  ------------------
  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  195|      0|        })
  |  |  ------------------
  |  |  215|      0|        })
  ------------------
  909|      0|        return -EPROTO;
  910|     65|}
wait_for_terminate_and_check:
  912|     65|int wait_for_terminate_and_check(const char *name, pid_t pid, WaitFlags flags) {
  913|     65|        return pidref_wait_for_terminate_and_check(name, &PIDREF_MAKE_FROM_PID(pid), flags);
  ------------------
  |  |   50|     65|#define PIDREF_MAKE_FROM_PID(x) (PidRef) { .pid = (x), .fd = -EBADF }
  ------------------
  914|     65|}
getpid_cached:
 1387|  4.01k|pid_t getpid_cached(void) {
 1388|  4.01k|        static bool installed = false;
 1389|  4.01k|        pid_t current_value = CACHED_PID_UNSET;
  ------------------
  |  | 1377|  4.01k|#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|  4.01k|        (void) __atomic_compare_exchange_n(
 1401|  4.01k|                        &cached_pid,
 1402|  4.01k|                        &current_value,
 1403|  4.01k|                        CACHED_PID_BUSY,
  ------------------
  |  | 1378|  4.01k|#define CACHED_PID_BUSY ((pid_t) -1)
  ------------------
 1404|  4.01k|                        false,
 1405|  4.01k|                        __ATOMIC_SEQ_CST,
 1406|  4.01k|                        __ATOMIC_SEQ_CST);
 1407|       |
 1408|  4.01k|        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: 4.01k]
  ------------------
 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: 4.01k]
  ------------------
 1434|      0|                return getpid();
 1435|       |
 1436|  4.01k|        default: /* Properly initialized */
  ------------------
  |  Branch (1436:9): [True: 4.01k, False: 1]
  ------------------
 1437|  4.01k|                return current_value;
 1438|  4.01k|        }
 1439|  4.01k|}
pidref_safe_fork_full:
 1505|     65|                PidRef *ret_pid) {
 1506|       |
 1507|     65|        pid_t original_pid, pid;
 1508|     65|        sigset_t saved_ss, ss;
 1509|     65|        _unused_ _cleanup_(restore_sigsetp) sigset_t *saved_ssp = NULL;
 1510|     65|        bool block_signals = false, block_all = false, intermediary = false;
 1511|     65|        _cleanup_close_pair_ int pidref_transport_fds[2] = EBADF_PAIR;
  ------------------
  |  |   64|     65|#define _cleanup_close_pair_ _cleanup_(close_pairp)
  ------------------
                      _cleanup_close_pair_ int pidref_transport_fds[2] = EBADF_PAIR;
  ------------------
  |  |   18|     65|#define EBADF_PAIR { -EBADF, -EBADF }
  ------------------
 1512|     65|        int prio, r;
 1513|       |
 1514|     65|        assert(!FLAGS_SET(flags, FORK_WAIT|FORK_FREEZE));
 1515|     65|        assert(!FLAGS_SET(flags, FORK_DETACH) ||
 1516|     65|               (flags & (FORK_WAIT|FORK_DEATHSIG_SIGTERM|FORK_DEATHSIG_SIGINT|FORK_DEATHSIG_SIGKILL)) == 0);
 1517|       |
 1518|       |        /* A wrapper around fork(), that does a couple of important initializations in addition to mere
 1519|       |         * forking. If provided, ret_pid is initialized in both the parent and the child process, both times
 1520|       |         * referencing the child process. Returns == 0 in the child and > 0 in the parent. */
 1521|       |
 1522|     65|        prio = flags & FORK_LOG ? LOG_ERR : LOG_DEBUG;
  ------------------
  |  Branch (1522:16): [True: 0, False: 65]
  ------------------
 1523|       |
 1524|     65|        original_pid = getpid_cached();
 1525|       |
 1526|     65|        if (flags & FORK_FLUSH_STDIO) {
  ------------------
  |  Branch (1526:13): [True: 0, False: 65]
  ------------------
 1527|      0|                fflush(stdout);
 1528|      0|                fflush(stderr); /* This one shouldn't be necessary, stderr should be unbuffered anyway, but let's better be safe than sorry */
 1529|      0|        }
 1530|       |
 1531|     65|        if (flags & (FORK_RESET_SIGNALS|FORK_DEATHSIG_SIGTERM|FORK_DEATHSIG_SIGINT)) {
  ------------------
  |  Branch (1531:13): [True: 65, False: 0]
  ------------------
 1532|       |                /* We temporarily block all signals, so that the new child has them blocked initially. This
 1533|       |                 * way, we can be sure that SIGTERMs are not lost we might send to the child. (Note that for
 1534|       |                 * FORK_DEATHSIG_SIGKILL we don't bother, since it cannot be blocked anyway.) */
 1535|       |
 1536|     65|                assert_se(sigfillset(&ss) >= 0);
 1537|     65|                block_signals = block_all = true;
 1538|       |
 1539|     65|        } else if (flags & FORK_WAIT) {
  ------------------
  |  Branch (1539:20): [True: 0, False: 0]
  ------------------
 1540|       |                /* Let's block SIGCHLD at least, so that we can safely watch for the child process */
 1541|       |
 1542|      0|                assert_se(sigemptyset(&ss) >= 0);
 1543|      0|                assert_se(sigaddset(&ss, SIGCHLD) >= 0);
 1544|      0|                block_signals = true;
 1545|      0|        }
 1546|       |
 1547|     65|        if (block_signals) {
  ------------------
  |  Branch (1547:13): [True: 65, False: 0]
  ------------------
 1548|     65|                if (sigprocmask(SIG_BLOCK, &ss, &saved_ss) < 0)
  ------------------
  |  Branch (1548:21): [True: 0, False: 65]
  ------------------
 1549|      0|                        return log_full_errno(prio, errno, "Failed to block signal mask: %m");
  ------------------
  |  |  204|      0|        ({                                                              \
  |  |  205|      0|                int _error = (error);                                   \
  |  |  206|      0|                ASSERT_NON_ZERO(_error);                                \
  |  |  ------------------
  |  |  |  |  198|      0|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  ------------------
  |  |  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__) \
  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  ------------------
  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  195|      0|        })
  |  |  ------------------
  |  |  208|      0|        })
  ------------------
 1550|     65|                saved_ssp = &saved_ss;
 1551|     65|        }
 1552|       |
 1553|     65|        if (FLAGS_SET(flags, FORK_DETACH)) {
 1554|       |                /* Fork off intermediary child if needed */
 1555|       |
 1556|      0|                r = is_reaper_process();
 1557|      0|                if (r < 0)
  ------------------
  |  Branch (1557:21): [True: 0, False: 0]
  ------------------
 1558|      0|                        return log_full_errno(prio, r, "Failed to determine if we are a reaper process: %m");
  ------------------
  |  |  204|      0|        ({                                                              \
  |  |  205|      0|                int _error = (error);                                   \
  |  |  206|      0|                ASSERT_NON_ZERO(_error);                                \
  |  |  ------------------
  |  |  |  |  198|      0|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  ------------------
  |  |  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__) \
  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  ------------------
  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  195|      0|        })
  |  |  ------------------
  |  |  208|      0|        })
  ------------------
 1559|       |
 1560|      0|                if (!r) {
  ------------------
  |  Branch (1560:21): [True: 0, False: 0]
  ------------------
 1561|       |                        /* Not a reaper process, hence do a double fork() so we are reparented to one */
 1562|       |
 1563|      0|                        if (ret_pid && socketpair(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0, pidref_transport_fds) < 0)
  ------------------
  |  Branch (1563:29): [True: 0, False: 0]
  |  Branch (1563:40): [True: 0, False: 0]
  ------------------
 1564|      0|                                return log_full_errno(prio, errno, "Failed to allocate pidref socket: %m");
  ------------------
  |  |  204|      0|        ({                                                              \
  |  |  205|      0|                int _error = (error);                                   \
  |  |  206|      0|                ASSERT_NON_ZERO(_error);                                \
  |  |  ------------------
  |  |  |  |  198|      0|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  ------------------
  |  |  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__) \
  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  ------------------
  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  195|      0|        })
  |  |  ------------------
  |  |  208|      0|        })
  ------------------
 1565|       |
 1566|      0|                        pid = fork();
 1567|      0|                        if (pid < 0)
  ------------------
  |  Branch (1567:29): [True: 0, False: 0]
  ------------------
 1568|      0|                                return log_full_errno(prio, errno, "Failed to fork off '%s': %m", strna(name));
  ------------------
  |  |  204|      0|        ({                                                              \
  |  |  205|      0|                int _error = (error);                                   \
  |  |  206|      0|                ASSERT_NON_ZERO(_error);                                \
  |  |  ------------------
  |  |  |  |  198|      0|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  ------------------
  |  |  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__) \
  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  ------------------
  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  195|      0|        })
  |  |  ------------------
  |  |  208|      0|        })
  ------------------
 1569|      0|                        if (pid > 0) {
  ------------------
  |  Branch (1569:29): [True: 0, False: 0]
  ------------------
 1570|      0|                                log_debug("Successfully forked off intermediary '%s' as PID " PID_FMT ".", strna(name), pid);
  ------------------
  |  |  220|      0|#define log_debug(...)     log_full(LOG_DEBUG,   __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"));                    \
  |  |  |  |  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__) \
  |  |  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|        })
  |  |  |  |  ------------------
  |  |  |  |  215|      0|        })
  |  |  ------------------
  ------------------
 1571|       |
 1572|      0|                                pidref_transport_fds[1] = safe_close(pidref_transport_fds[1]);
 1573|       |
 1574|      0|                                if (pidref_transport_fds[0] >= 0) {
  ------------------
  |  Branch (1574:37): [True: 0, False: 0]
  ------------------
 1575|       |                                        /* Wait for the intermediary child to exit so the caller can be certain the actual child
 1576|       |                                         * process has been reparented by the time this function returns. */
 1577|      0|                                        r = wait_for_terminate_and_check(name, pid, FLAGS_SET(flags, FORK_LOG) ? WAIT_LOG : 0);
 1578|      0|                                        if (r < 0)
  ------------------
  |  Branch (1578:45): [True: 0, False: 0]
  ------------------
 1579|      0|                                                return log_full_errno(prio, r, "Failed to wait for intermediary process: %m");
  ------------------
  |  |  204|      0|        ({                                                              \
  |  |  205|      0|                int _error = (error);                                   \
  |  |  206|      0|                ASSERT_NON_ZERO(_error);                                \
  |  |  ------------------
  |  |  |  |  198|      0|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  ------------------
  |  |  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__) \
  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  ------------------
  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  195|      0|        })
  |  |  ------------------
  |  |  208|      0|        })
  ------------------
 1580|      0|                                        if (r != EXIT_SUCCESS) /* exit status > 0 should be treated as failure, too */
  ------------------
  |  Branch (1580:45): [True: 0, False: 0]
  ------------------
 1581|      0|                                                return -EPROTO;
 1582|       |
 1583|      0|                                        int pidfd;
 1584|      0|                                        ssize_t n = receive_one_fd_iov(
 1585|      0|                                                        pidref_transport_fds[0],
 1586|      0|                                                        &IOVEC_MAKE(&pid, sizeof(pid)),
  ------------------
  |  |   21|      0|        (struct iovec) {                                                \
  |  |   22|      0|                .iov_base = (void*) (base),                             \
  |  |   23|      0|                .iov_len = (len),                                       \
  |  |   24|      0|        }
  ------------------
 1587|      0|                                                        /* iovlen= */ 1,
 1588|      0|                                                        /* flags= */ 0,
 1589|      0|                                                        &pidfd);
 1590|      0|                                        if (n < 0)
  ------------------
  |  Branch (1590:45): [True: 0, False: 0]
  ------------------
 1591|      0|                                                return log_full_errno(prio, n, "Failed to receive child pidref: %m");
  ------------------
  |  |  204|      0|        ({                                                              \
  |  |  205|      0|                int _error = (error);                                   \
  |  |  206|      0|                ASSERT_NON_ZERO(_error);                                \
  |  |  ------------------
  |  |  |  |  198|      0|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  ------------------
  |  |  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__) \
  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  ------------------
  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  195|      0|        })
  |  |  ------------------
  |  |  208|      0|        })
  ------------------
 1592|       |
 1593|      0|                                        *ret_pid = (PidRef) { .pid = pid, .fd = pidfd };
 1594|      0|                                }
 1595|       |
 1596|      0|                                return 1; /* return in the parent */
 1597|      0|                        }
 1598|       |
 1599|      0|                        pidref_transport_fds[0] = safe_close(pidref_transport_fds[0]);
 1600|      0|                        intermediary = true;
 1601|      0|                }
 1602|      0|        }
 1603|       |
 1604|     65|        if ((flags & (FORK_NEW_MOUNTNS|FORK_NEW_USERNS|FORK_NEW_NETNS|FORK_NEW_PIDNS)) != 0)
  ------------------
  |  Branch (1604:13): [True: 0, False: 65]
  ------------------
 1605|      0|                pid = raw_clone(SIGCHLD|
 1606|      0|                                (FLAGS_SET(flags, FORK_NEW_MOUNTNS) ? CLONE_NEWNS : 0) |
 1607|      0|                                (FLAGS_SET(flags, FORK_NEW_USERNS) ? CLONE_NEWUSER : 0) |
 1608|      0|                                (FLAGS_SET(flags, FORK_NEW_NETNS) ? CLONE_NEWNET : 0) |
 1609|      0|                                (FLAGS_SET(flags, FORK_NEW_PIDNS) ? CLONE_NEWPID : 0));
 1610|     65|        else
 1611|     65|                pid = fork();
 1612|     65|        if (pid < 0)
  ------------------
  |  Branch (1612:13): [True: 0, False: 65]
  ------------------
 1613|      0|                return log_full_errno(prio, errno, "Failed to fork off '%s': %m", strna(name));
  ------------------
  |  |  204|      0|        ({                                                              \
  |  |  205|      0|                int _error = (error);                                   \
  |  |  206|      0|                ASSERT_NON_ZERO(_error);                                \
  |  |  ------------------
  |  |  |  |  198|      0|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  ------------------
  |  |  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__) \
  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  ------------------
  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  195|      0|        })
  |  |  ------------------
  |  |  208|      0|        })
  ------------------
 1614|     65|        if (pid > 0) {
  ------------------
  |  Branch (1614:13): [True: 65, False: 0]
  ------------------
 1615|       |
 1616|       |                /* If we are in the intermediary process, exit now */
 1617|     65|                if (intermediary) {
  ------------------
  |  Branch (1617:21): [True: 0, False: 65]
  ------------------
 1618|      0|                        if (pidref_transport_fds[1] >= 0) {
  ------------------
  |  Branch (1618:29): [True: 0, False: 0]
  ------------------
 1619|      0|                                _cleanup_(pidref_done) PidRef pidref = PIDREF_NULL;
  ------------------
  |  |   41|      0|#define PIDREF_NULL (PidRef) { .fd = -EBADF }
  ------------------
 1620|       |
 1621|      0|                                r = pidref_set_pid(&pidref, pid);
 1622|      0|                                if (r < 0) {
  ------------------
  |  Branch (1622:37): [True: 0, False: 0]
  ------------------
 1623|      0|                                        log_full_errno(prio, r, "Failed to open reference to PID "PID_FMT": %m", pid);
  ------------------
  |  |  204|      0|        ({                                                              \
  |  |  205|      0|                int _error = (error);                                   \
  |  |  206|      0|                ASSERT_NON_ZERO(_error);                                \
  |  |  ------------------
  |  |  |  |  198|      0|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  ------------------
  |  |  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__) \
  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  ------------------
  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  195|      0|        })
  |  |  ------------------
  |  |  208|      0|        })
  ------------------
 1624|      0|                                        _exit(EXIT_FAILURE);
 1625|      0|                                }
 1626|       |
 1627|      0|                                r = send_one_fd_iov(
  ------------------
  |  |  184|      0|#define send_one_fd_iov(transport_fd, fd, iov, iovlen, flags) send_one_fd_iov_sa(transport_fd, fd, iov, iovlen, NULL, 0, flags)
  ------------------
 1628|      0|                                                pidref_transport_fds[1],
 1629|      0|                                                pidref.fd,
 1630|      0|                                                &IOVEC_MAKE(&pidref.pid, sizeof(pidref.pid)),
 1631|      0|                                                /* iovlen= */ 1,
 1632|      0|                                                /* flags= */ 0);
 1633|      0|                                if (r < 0) {
  ------------------
  |  Branch (1633:37): [True: 0, False: 0]
  ------------------
 1634|      0|                                        log_full_errno(prio, r, "Failed to send child pidref: %m");
  ------------------
  |  |  204|      0|        ({                                                              \
  |  |  205|      0|                int _error = (error);                                   \
  |  |  206|      0|                ASSERT_NON_ZERO(_error);                                \
  |  |  ------------------
  |  |  |  |  198|      0|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  ------------------
  |  |  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__) \
  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  ------------------
  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  195|      0|        })
  |  |  ------------------
  |  |  208|      0|        })
  ------------------
 1635|      0|                                        _exit(EXIT_FAILURE);
 1636|      0|                                }
 1637|      0|                        }
 1638|       |
 1639|      0|                        _exit(EXIT_SUCCESS);
 1640|      0|                }
 1641|       |
 1642|       |                /* We are in the parent process */
 1643|     65|                log_debug("Successfully forked off '%s' as PID " PID_FMT ".", strna(name), pid);
  ------------------
  |  |  220|     65|#define log_debug(...)     log_full(LOG_DEBUG,   __VA_ARGS__)
  |  |  ------------------
  |  |  |  |  211|     65|        ({                                                             \
  |  |  |  |  212|     65|                if (BUILD_MODE_DEVELOPER)                              \
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|     65|#define BUILD_MODE_DEVELOPER 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (23:30): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  213|     65|                        assert(!strstr(fmt, "%m"));                    \
  |  |  |  |  214|     65|                (void) log_full_errno_zerook(level, 0, fmt, ##__VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  |  189|     65|        ({                                                              \
  |  |  |  |  |  |  190|     65|                int _level = (level), _e = (error);                     \
  |  |  |  |  |  |  191|     65|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (191:22): [True: 0, False: 65]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  192|     65|                        ? log_internal(_level, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
  |  |  |  |  |  |  193|     65|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|    130|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|     65|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 65]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|     65|        })
  |  |  |  |  ------------------
  |  |  |  |  215|     65|        })
  |  |  ------------------
  ------------------
 1644|       |
 1645|     65|                if (flags & FORK_WAIT) {
  ------------------
  |  Branch (1645:21): [True: 65, False: 0]
  ------------------
 1646|     65|                        if (block_all) {
  ------------------
  |  Branch (1646:29): [True: 65, False: 0]
  ------------------
 1647|       |                                /* undo everything except SIGCHLD */
 1648|     65|                                ss = saved_ss;
 1649|     65|                                assert_se(sigaddset(&ss, SIGCHLD) >= 0);
 1650|     65|                                (void) sigprocmask(SIG_SETMASK, &ss, NULL);
 1651|     65|                        }
 1652|       |
 1653|     65|                        r = wait_for_terminate_and_check(name, pid, (flags & FORK_LOG ? WAIT_LOG : 0));
  ------------------
  |  Branch (1653:70): [True: 0, False: 65]
  ------------------
 1654|     65|                        if (r < 0)
  ------------------
  |  Branch (1654:29): [True: 0, False: 65]
  ------------------
 1655|      0|                                return r;
 1656|     65|                        if (r != EXIT_SUCCESS) /* exit status > 0 should be treated as failure, too */
  ------------------
  |  Branch (1656:29): [True: 0, False: 65]
  ------------------
 1657|      0|                                return -EPROTO;
 1658|       |
 1659|       |                        /* If we are in the parent and successfully waited, then the process doesn't exist anymore. */
 1660|     65|                        if (ret_pid)
  ------------------
  |  Branch (1660:29): [True: 0, False: 65]
  ------------------
 1661|      0|                                *ret_pid = PIDREF_NULL;
  ------------------
  |  |   41|      0|#define PIDREF_NULL (PidRef) { .fd = -EBADF }
  ------------------
 1662|       |
 1663|     65|                        return 1;
 1664|     65|                }
 1665|       |
 1666|      0|                if (ret_pid) {
  ------------------
  |  Branch (1666:21): [True: 0, False: 0]
  ------------------
 1667|      0|                        if (FLAGS_SET(flags, FORK_PID_ONLY))
 1668|      0|                                *ret_pid = PIDREF_MAKE_FROM_PID(pid);
  ------------------
  |  |   50|      0|#define PIDREF_MAKE_FROM_PID(x) (PidRef) { .pid = (x), .fd = -EBADF }
  ------------------
 1669|      0|                        else {
 1670|      0|                                r = pidref_set_pid(ret_pid, pid);
 1671|      0|                                if (r < 0) /* Let's not fail for this, no matter what, the process exists after all, and that's key */
  ------------------
  |  Branch (1671:37): [True: 0, False: 0]
  ------------------
 1672|      0|                                        *ret_pid = PIDREF_MAKE_FROM_PID(pid);
  ------------------
  |  |   50|      0|#define PIDREF_MAKE_FROM_PID(x) (PidRef) { .pid = (x), .fd = -EBADF }
  ------------------
 1673|      0|                        }
 1674|      0|                }
 1675|       |
 1676|      0|                return 1;
 1677|     65|        }
 1678|       |
 1679|       |        /* We are in the child process */
 1680|       |
 1681|      0|        pidref_transport_fds[1] = safe_close(pidref_transport_fds[1]);
 1682|       |
 1683|       |        /* Restore signal mask manually */
 1684|      0|        saved_ssp = NULL;
 1685|       |
 1686|      0|        if (flags & FORK_REOPEN_LOG) {
  ------------------
  |  Branch (1686:13): [True: 0, False: 0]
  ------------------
 1687|       |                /* Close the logs if requested, before we log anything. And make sure we reopen it if needed. */
 1688|      0|                log_close();
 1689|      0|                log_set_open_when_needed(true);
 1690|      0|                log_settle_target();
 1691|      0|        }
 1692|       |
 1693|      0|        if (name) {
  ------------------
  |  Branch (1693:13): [True: 0, False: 0]
  ------------------
 1694|      0|                r = rename_process(name);
 1695|      0|                if (r < 0)
  ------------------
  |  Branch (1695:21): [True: 0, False: 0]
  ------------------
 1696|      0|                        log_full_errno(flags & FORK_LOG ? LOG_WARNING : LOG_DEBUG,
  ------------------
  |  |  204|      0|        ({                                                              \
  |  |  205|      0|                int _error = (error);                                   \
  |  |  206|      0|                ASSERT_NON_ZERO(_error);                                \
  |  |  ------------------
  |  |  |  |  198|      0|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  ------------------
  |  |  207|      0|                log_full_errno_zerook(level, _error, __VA_ARGS__);      \
  |  |  ------------------
  |  |  |  |  189|      0|        ({                                                              \
  |  |  |  |  190|      0|                int _level = (level), _e = (error);                     \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (190:31): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  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__) \
  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  ------------------
  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  195|      0|        })
  |  |  ------------------
  |  |  208|      0|        })
  ------------------
 1697|      0|                                       r, "Failed to rename process, ignoring: %m");
 1698|      0|        }
 1699|       |
 1700|      0|        if (flags & (FORK_DEATHSIG_SIGTERM|FORK_DEATHSIG_SIGINT|FORK_DEATHSIG_SIGKILL))
  ------------------
  |  Branch (1700:13): [True: 0, False: 0]
  ------------------
 1701|      0|                if (prctl(PR_SET_PDEATHSIG, fork_flags_to_signal(flags)) < 0) {
  ------------------
  |  Branch (1701:21): [True: 0, False: 0]
  ------------------
 1702|      0|                        log_full_errno(prio, errno, "Failed to set death signal: %m");
  ------------------
  |  |  204|      0|        ({                                                              \
  |  |  205|      0|                int _error = (error);                                   \
  |  |  206|      0|                ASSERT_NON_ZERO(_error);                                \
  |  |  ------------------
  |  |  |  |  198|      0|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  ------------------
  |  |  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__) \
  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  ------------------
  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  195|      0|        })
  |  |  ------------------
  |  |  208|      0|        })
  ------------------
 1703|      0|                        _exit(EXIT_FAILURE);
 1704|      0|                }
 1705|       |
 1706|      0|        if (flags & FORK_RESET_SIGNALS) {
  ------------------
  |  Branch (1706:13): [True: 0, False: 0]
  ------------------
 1707|      0|                r = reset_all_signal_handlers();
 1708|      0|                if (r < 0) {
  ------------------
  |  Branch (1708:21): [True: 0, False: 0]
  ------------------
 1709|      0|                        log_full_errno(prio, r, "Failed to reset signal handlers: %m");
  ------------------
  |  |  204|      0|        ({                                                              \
  |  |  205|      0|                int _error = (error);                                   \
  |  |  206|      0|                ASSERT_NON_ZERO(_error);                                \
  |  |  ------------------
  |  |  |  |  198|      0|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  ------------------
  |  |  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__) \
  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  ------------------
  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  195|      0|        })
  |  |  ------------------
  |  |  208|      0|        })
  ------------------
 1710|      0|                        _exit(EXIT_FAILURE);
 1711|      0|                }
 1712|       |
 1713|       |                /* This implicitly undoes the signal mask stuff we did before the fork()ing above */
 1714|      0|                r = reset_signal_mask();
 1715|      0|                if (r < 0) {
  ------------------
  |  Branch (1715:21): [True: 0, False: 0]
  ------------------
 1716|      0|                        log_full_errno(prio, r, "Failed to reset signal mask: %m");
  ------------------
  |  |  204|      0|        ({                                                              \
  |  |  205|      0|                int _error = (error);                                   \
  |  |  206|      0|                ASSERT_NON_ZERO(_error);                                \
  |  |  ------------------
  |  |  |  |  198|      0|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  ------------------
  |  |  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__) \
  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  ------------------
  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  195|      0|        })
  |  |  ------------------
  |  |  208|      0|        })
  ------------------
 1717|      0|                        _exit(EXIT_FAILURE);
 1718|      0|                }
 1719|      0|        } else if (block_signals) { /* undo what we did above */
  ------------------
  |  Branch (1719:20): [True: 0, False: 0]
  ------------------
 1720|      0|                if (sigprocmask(SIG_SETMASK, &saved_ss, NULL) < 0) {
  ------------------
  |  Branch (1720:21): [True: 0, False: 0]
  ------------------
 1721|      0|                        log_full_errno(prio, errno, "Failed to restore signal mask: %m");
  ------------------
  |  |  204|      0|        ({                                                              \
  |  |  205|      0|                int _error = (error);                                   \
  |  |  206|      0|                ASSERT_NON_ZERO(_error);                                \
  |  |  ------------------
  |  |  |  |  198|      0|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  ------------------
  |  |  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__) \
  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  ------------------
  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  195|      0|        })
  |  |  ------------------
  |  |  208|      0|        })
  ------------------
 1722|      0|                        _exit(EXIT_FAILURE);
 1723|      0|                }
 1724|      0|        }
 1725|       |
 1726|      0|        if (flags & (FORK_DEATHSIG_SIGTERM|FORK_DEATHSIG_SIGKILL|FORK_DEATHSIG_SIGINT)) {
  ------------------
  |  Branch (1726:13): [True: 0, False: 0]
  ------------------
 1727|      0|                pid_t ppid;
 1728|       |                /* Let's see if the parent PID is still the one we started from? If not, then the parent
 1729|       |                 * already died by the time we set PR_SET_PDEATHSIG, hence let's emulate the effect */
 1730|       |
 1731|      0|                ppid = getppid();
 1732|      0|                if (ppid == 0)
  ------------------
  |  Branch (1732:21): [True: 0, False: 0]
  ------------------
 1733|      0|                        /* Parent is in a different PID namespace. */;
 1734|      0|                else if (ppid != original_pid) {
  ------------------
  |  Branch (1734:26): [True: 0, False: 0]
  ------------------
 1735|      0|                        int sig = fork_flags_to_signal(flags);
 1736|      0|                        log_debug("Parent died early, raising %s.", signal_to_string(sig));
  ------------------
  |  |  220|      0|#define log_debug(...)     log_full(LOG_DEBUG,   __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"));                    \
  |  |  |  |  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__) \
  |  |  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|        })
  |  |  |  |  ------------------
  |  |  |  |  215|      0|        })
  |  |  ------------------
  ------------------
 1737|      0|                        (void) raise(sig);
 1738|      0|                        _exit(EXIT_FAILURE);
 1739|      0|                }
 1740|      0|        }
 1741|       |
 1742|      0|        if (FLAGS_SET(flags, FORK_NEW_MOUNTNS | FORK_MOUNTNS_SLAVE)) {
 1743|       |                /* Optionally, make sure we never propagate mounts to the host. */
 1744|      0|                if (mount(NULL, "/", NULL, MS_SLAVE | MS_REC, NULL) < 0) {
  ------------------
  |  Branch (1744:21): [True: 0, False: 0]
  ------------------
 1745|      0|                        log_full_errno(prio, errno, "Failed to remount root directory as MS_SLAVE: %m");
  ------------------
  |  |  204|      0|        ({                                                              \
  |  |  205|      0|                int _error = (error);                                   \
  |  |  206|      0|                ASSERT_NON_ZERO(_error);                                \
  |  |  ------------------
  |  |  |  |  198|      0|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  ------------------
  |  |  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__) \
  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  ------------------
  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  195|      0|        })
  |  |  ------------------
  |  |  208|      0|        })
  ------------------
 1746|      0|                        _exit(EXIT_FAILURE);
 1747|      0|                }
 1748|      0|        }
 1749|       |
 1750|      0|        if (FLAGS_SET(flags, FORK_PRIVATE_TMP)) {
 1751|      0|                assert(FLAGS_SET(flags, FORK_NEW_MOUNTNS));
 1752|       |
 1753|       |                /* Optionally, overmount new tmpfs instance on /tmp/. */
 1754|      0|                r = mount_nofollow("tmpfs", "/tmp", "tmpfs",
 1755|      0|                                   MS_NOSUID|MS_NODEV,
 1756|      0|                                   "mode=01777" TMPFS_LIMITS_RUN);
  ------------------
  |  |   22|      0|#define TMPFS_LIMITS_RUN             ",size=20%,nr_inodes=800k"
  ------------------
 1757|      0|                if (r < 0) {
  ------------------
  |  Branch (1757:21): [True: 0, False: 0]
  ------------------
 1758|      0|                        log_full_errno(prio, r, "Failed to overmount /tmp/: %m");
  ------------------
  |  |  204|      0|        ({                                                              \
  |  |  205|      0|                int _error = (error);                                   \
  |  |  206|      0|                ASSERT_NON_ZERO(_error);                                \
  |  |  ------------------
  |  |  |  |  198|      0|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  ------------------
  |  |  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__) \
  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  ------------------
  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  195|      0|        })
  |  |  ------------------
  |  |  208|      0|        })
  ------------------
 1759|      0|                        _exit(EXIT_FAILURE);
 1760|      0|                }
 1761|      0|        }
 1762|       |
 1763|      0|        if (flags & FORK_REARRANGE_STDIO) {
  ------------------
  |  Branch (1763:13): [True: 0, False: 0]
  ------------------
 1764|      0|                if (stdio_fds) {
  ------------------
  |  Branch (1764:21): [True: 0, False: 0]
  ------------------
 1765|      0|                        r = rearrange_stdio(stdio_fds[0], stdio_fds[1], stdio_fds[2]);
 1766|      0|                        if (r < 0) {
  ------------------
  |  Branch (1766:29): [True: 0, False: 0]
  ------------------
 1767|      0|                                log_full_errno(prio, r, "Failed to rearrange stdio fds: %m");
  ------------------
  |  |  204|      0|        ({                                                              \
  |  |  205|      0|                int _error = (error);                                   \
  |  |  206|      0|                ASSERT_NON_ZERO(_error);                                \
  |  |  ------------------
  |  |  |  |  198|      0|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  ------------------
  |  |  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__) \
  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  ------------------
  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  195|      0|        })
  |  |  ------------------
  |  |  208|      0|        })
  ------------------
 1768|      0|                                _exit(EXIT_FAILURE);
 1769|      0|                        }
 1770|       |
 1771|       |                        /* Turn off O_NONBLOCK on the fdio fds, in case it was left on */
 1772|      0|                        stdio_disable_nonblock();
 1773|      0|                } else {
 1774|      0|                        r = make_null_stdio();
 1775|      0|                        if (r < 0) {
  ------------------
  |  Branch (1775:29): [True: 0, False: 0]
  ------------------
 1776|      0|                                log_full_errno(prio, r, "Failed to connect stdin/stdout to /dev/null: %m");
  ------------------
  |  |  204|      0|        ({                                                              \
  |  |  205|      0|                int _error = (error);                                   \
  |  |  206|      0|                ASSERT_NON_ZERO(_error);                                \
  |  |  ------------------
  |  |  |  |  198|      0|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  ------------------
  |  |  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__) \
  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  ------------------
  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  195|      0|        })
  |  |  ------------------
  |  |  208|      0|        })
  ------------------
 1777|      0|                                _exit(EXIT_FAILURE);
 1778|      0|                        }
 1779|      0|                }
 1780|      0|        } else if (flags & FORK_STDOUT_TO_STDERR) {
  ------------------
  |  Branch (1780:20): [True: 0, False: 0]
  ------------------
 1781|      0|                if (dup2(STDERR_FILENO, STDOUT_FILENO) < 0) {
  ------------------
  |  Branch (1781:21): [True: 0, False: 0]
  ------------------
 1782|      0|                        log_full_errno(prio, errno, "Failed to connect stdout to stderr: %m");
  ------------------
  |  |  204|      0|        ({                                                              \
  |  |  205|      0|                int _error = (error);                                   \
  |  |  206|      0|                ASSERT_NON_ZERO(_error);                                \
  |  |  ------------------
  |  |  |  |  198|      0|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  ------------------
  |  |  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__) \
  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  ------------------
  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  195|      0|        })
  |  |  ------------------
  |  |  208|      0|        })
  ------------------
 1783|      0|                        _exit(EXIT_FAILURE);
 1784|      0|                }
 1785|      0|        }
 1786|       |
 1787|      0|        if (flags & FORK_CLOSE_ALL_FDS) {
  ------------------
  |  Branch (1787:13): [True: 0, False: 0]
  ------------------
 1788|       |                /* Close the logs here in case it got reopened above, as close_all_fds() would close them for us */
 1789|      0|                log_close();
 1790|       |
 1791|      0|                r = close_all_fds(except_fds, n_except_fds);
 1792|      0|                if (r < 0) {
  ------------------
  |  Branch (1792:21): [True: 0, False: 0]
  ------------------
 1793|      0|                        log_full_errno(prio, r, "Failed to close all file descriptors: %m");
  ------------------
  |  |  204|      0|        ({                                                              \
  |  |  205|      0|                int _error = (error);                                   \
  |  |  206|      0|                ASSERT_NON_ZERO(_error);                                \
  |  |  ------------------
  |  |  |  |  198|      0|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  ------------------
  |  |  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__) \
  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  ------------------
  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  195|      0|        })
  |  |  ------------------
  |  |  208|      0|        })
  ------------------
 1794|      0|                        _exit(EXIT_FAILURE);
 1795|      0|                }
 1796|      0|        }
 1797|       |
 1798|      0|        if (flags & FORK_PACK_FDS) {
  ------------------
  |  Branch (1798:13): [True: 0, False: 0]
  ------------------
 1799|       |                /* FORK_CLOSE_ALL_FDS ensures that except_fds are the only FDs >= 3 that are
 1800|       |                 * open, this is including the log. This is required by pack_fds, which will
 1801|       |                 * get stuck in an infinite loop of any FDs other than except_fds are open. */
 1802|      0|                assert(FLAGS_SET(flags, FORK_CLOSE_ALL_FDS));
 1803|       |
 1804|      0|                r = pack_fds(except_fds, n_except_fds);
 1805|      0|                if (r < 0) {
  ------------------
  |  Branch (1805:21): [True: 0, False: 0]
  ------------------
 1806|      0|                        log_full_errno(prio, r, "Failed to pack file descriptors: %m");
  ------------------
  |  |  204|      0|        ({                                                              \
  |  |  205|      0|                int _error = (error);                                   \
  |  |  206|      0|                ASSERT_NON_ZERO(_error);                                \
  |  |  ------------------
  |  |  |  |  198|      0|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  ------------------
  |  |  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__) \
  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  ------------------
  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  195|      0|        })
  |  |  ------------------
  |  |  208|      0|        })
  ------------------
 1807|      0|                        _exit(EXIT_FAILURE);
 1808|      0|                }
 1809|      0|        }
 1810|       |
 1811|      0|        if (flags & FORK_CLOEXEC_OFF) {
  ------------------
  |  Branch (1811:13): [True: 0, False: 0]
  ------------------
 1812|      0|                r = fd_cloexec_many(except_fds, n_except_fds, false);
 1813|      0|                if (r < 0) {
  ------------------
  |  Branch (1813:21): [True: 0, False: 0]
  ------------------
 1814|      0|                        log_full_errno(prio, r, "Failed to turn off O_CLOEXEC on file descriptors: %m");
  ------------------
  |  |  204|      0|        ({                                                              \
  |  |  205|      0|                int _error = (error);                                   \
  |  |  206|      0|                ASSERT_NON_ZERO(_error);                                \
  |  |  ------------------
  |  |  |  |  198|      0|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  ------------------
  |  |  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__) \
  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  ------------------
  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  195|      0|        })
  |  |  ------------------
  |  |  208|      0|        })
  ------------------
 1815|      0|                        _exit(EXIT_FAILURE);
 1816|      0|                }
 1817|      0|        }
 1818|       |
 1819|       |        /* When we were asked to reopen the logs, do so again now */
 1820|      0|        if (flags & FORK_REOPEN_LOG) {
  ------------------
  |  Branch (1820:13): [True: 0, False: 0]
  ------------------
 1821|      0|                log_open();
 1822|      0|                log_set_open_when_needed(false);
 1823|      0|        }
 1824|       |
 1825|      0|        if (flags & FORK_RLIMIT_NOFILE_SAFE) {
  ------------------
  |  Branch (1825:13): [True: 0, False: 0]
  ------------------
 1826|      0|                r = rlimit_nofile_safe();
 1827|      0|                if (r < 0) {
  ------------------
  |  Branch (1827:21): [True: 0, False: 0]
  ------------------
 1828|      0|                        log_full_errno(prio, r, "Failed to lower RLIMIT_NOFILE's soft limit to 1K: %m");
  ------------------
  |  |  204|      0|        ({                                                              \
  |  |  205|      0|                int _error = (error);                                   \
  |  |  206|      0|                ASSERT_NON_ZERO(_error);                                \
  |  |  ------------------
  |  |  |  |  198|      0|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  ------------------
  |  |  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__) \
  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  ------------------
  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  195|      0|        })
  |  |  ------------------
  |  |  208|      0|        })
  ------------------
 1829|      0|                        _exit(EXIT_FAILURE);
 1830|      0|                }
 1831|      0|        }
 1832|       |
 1833|      0|        if (!FLAGS_SET(flags, FORK_KEEP_NOTIFY_SOCKET)) {
  ------------------
  |  Branch (1833:13): [True: 0, False: 0]
  ------------------
 1834|      0|                r = RET_NERRNO(unsetenv("NOTIFY_SOCKET"));
 1835|      0|                if (r < 0) {
  ------------------
  |  Branch (1835:21): [True: 0, False: 0]
  ------------------
 1836|      0|                        log_full_errno(prio, r, "Failed to unset $NOTIFY_SOCKET: %m");
  ------------------
  |  |  204|      0|        ({                                                              \
  |  |  205|      0|                int _error = (error);                                   \
  |  |  206|      0|                ASSERT_NON_ZERO(_error);                                \
  |  |  ------------------
  |  |  |  |  198|      0|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  ------------------
  |  |  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__) \
  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  ------------------
  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  195|      0|        })
  |  |  ------------------
  |  |  208|      0|        })
  ------------------
 1837|      0|                        _exit(EXIT_FAILURE);
 1838|      0|                }
 1839|      0|        }
 1840|       |
 1841|      0|        if (FLAGS_SET(flags, FORK_FREEZE))
 1842|      0|                freeze();
 1843|       |
 1844|      0|        if (ret_pid) {
  ------------------
  |  Branch (1844:13): [True: 0, False: 0]
  ------------------
 1845|      0|                if (FLAGS_SET(flags, FORK_PID_ONLY))
 1846|      0|                        *ret_pid = PIDREF_MAKE_FROM_PID(getpid_cached());
  ------------------
  |  |   50|      0|#define PIDREF_MAKE_FROM_PID(x) (PidRef) { .pid = (x), .fd = -EBADF }
  ------------------
 1847|      0|                else {
 1848|      0|                        r = pidref_set_self(ret_pid);
 1849|      0|                        if (r < 0) {
  ------------------
  |  Branch (1849:29): [True: 0, False: 0]
  ------------------
 1850|      0|                                log_full_errno(prio, r, "Failed to acquire PID reference on ourselves: %m");
  ------------------
  |  |  204|      0|        ({                                                              \
  |  |  205|      0|                int _error = (error);                                   \
  |  |  206|      0|                ASSERT_NON_ZERO(_error);                                \
  |  |  ------------------
  |  |  |  |  198|      0|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  ------------------
  |  |  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__) \
  |  |  |  |  193|      0|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      0|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  ------------------
  |  |  |  |  194|      0|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  195|      0|        })
  |  |  ------------------
  |  |  208|      0|        })
  ------------------
 1851|      0|                                _exit(EXIT_FAILURE);
 1852|      0|                        }
 1853|      0|                }
 1854|      0|        }
 1855|       |
 1856|      0|        return 0;
 1857|      0|}
safe_fork_full:
 1865|     65|                pid_t *ret_pid) {
 1866|       |
 1867|     65|        _cleanup_(pidref_done) PidRef pidref = PIDREF_NULL;
  ------------------
  |  |   41|     65|#define PIDREF_NULL (PidRef) { .fd = -EBADF }
  ------------------
 1868|     65|        int r;
 1869|       |
 1870|       |        /* Getting the detached child process pid without pidfd is racy, so don't allow it if not returning
 1871|       |         * a pidref to the caller. */
 1872|     65|        assert(!FLAGS_SET(flags, FORK_DETACH) || !ret_pid);
 1873|       |
 1874|     65|        r = pidref_safe_fork_full(name, stdio_fds, except_fds, n_except_fds, flags|FORK_PID_ONLY, ret_pid ? &pidref : NULL);
  ------------------
  |  Branch (1874:99): [True: 0, False: 65]
  ------------------
 1875|     65|        if (r < 0 || !ret_pid)
  ------------------
  |  Branch (1875:13): [True: 0, False: 65]
  |  Branch (1875:22): [True: 65, False: 0]
  ------------------
 1876|     65|                return r;
 1877|       |
 1878|      0|        *ret_pid = pidref.pid;
 1879|       |
 1880|      0|        return r;
 1881|     65|}
process-util.c:restore_sigsetp:
 1488|     65|static void restore_sigsetp(sigset_t **ssp) {
 1489|     65|        if (*ssp)
  ------------------
  |  Branch (1489:13): [True: 65, False: 0]
  ------------------
 1490|     65|                (void) sigprocmask(SIG_SETMASK, *ssp, NULL);
 1491|     65|}

time-util.c:safe_fork:
  213|     65|static inline int safe_fork(const char *name, ForkFlags flags, pid_t *ret_pid) {
  214|     65|        return safe_fork_full(name, NULL, NULL, 0, flags, ret_pid);
  215|     65|}

stat_verify_regular:
   46|     70|int stat_verify_regular(const struct stat *st) {
   47|     70|        assert(st);
  ------------------
  |  |   72|     70|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|     70|        do {                                                            \
  |  |  |  |   59|     70|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|     70|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 70]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|     70|                        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|     70|        } while (false)
  |  |  ------------------
  ------------------
   48|       |
   49|       |        /* Checks whether the specified stat() structure refers to a regular file. If not returns an
   50|       |         * appropriate error code. */
   51|       |
   52|     70|        if (S_ISDIR(st->st_mode))
   53|      2|                return -EISDIR;
   54|       |
   55|     68|        if (S_ISLNK(st->st_mode))
   56|      0|                return -ELOOP;
   57|       |
   58|     68|        if (!S_ISREG(st->st_mode))
  ------------------
  |  Branch (58:13): [True: 0, False: 68]
  ------------------
   59|      0|                return -EBADFD;
   60|       |
   61|     68|        return 0;
   62|     68|}
verify_regular_at:
   64|     70|int verify_regular_at(int fd, const char *path, bool follow) {
   65|     70|        return verify_stat_at(fd, path, follow, stat_verify_regular, true);
   66|     70|}
fd_verify_regular:
   68|     70|int fd_verify_regular(int fd) {
   69|     70|        assert(fd >= 0);
  ------------------
  |  |   72|     70|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|     70|        do {                                                            \
  |  |  |  |   59|     70|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|     70|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 70]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|     70|                        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|     70|        } while (false)
  |  |  ------------------
  ------------------
   70|     70|        return verify_regular_at(fd, NULL, false);
   71|     70|}
stat-util.c:verify_stat_at:
   29|     70|                bool verify) {
   30|       |
   31|     70|        struct stat st;
   32|     70|        int r;
   33|       |
   34|     70|        assert(fd >= 0 || fd == AT_FDCWD);
  ------------------
  |  |   72|     70|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|     70|        do {                                                            \
  |  |  |  |   59|     70|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|     70|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 70]
  |  |  |  |  |  |  |  Branch (95:44): [True: 70, False: 0]
  |  |  |  |  |  |  |  Branch (95:44): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|     70|                        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|     70|        } while (false)
  |  |  ------------------
  ------------------
   35|     70|        assert(!isempty(path) || !follow);
  ------------------
  |  |   72|     70|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|     70|        do {                                                            \
  |  |  |  |   59|     70|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|    140|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 70]
  |  |  |  |  |  |  |  Branch (95:44): [True: 0, False: 70]
  |  |  |  |  |  |  |  Branch (95:44): [True: 70, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|     70|                        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|     70|        } while (false)
  |  |  ------------------
  ------------------
   36|     70|        assert(verify_func);
  ------------------
  |  |   72|     70|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|     70|        do {                                                            \
  |  |  |  |   59|     70|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|     70|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 70]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|     70|                        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|     70|        } while (false)
  |  |  ------------------
  ------------------
   37|       |
   38|     70|        if (fstatat(fd, strempty(path), &st,
  ------------------
  |  Branch (38:13): [True: 0, False: 70]
  ------------------
   39|     70|                    (isempty(path) ? AT_EMPTY_PATH : 0) | (follow ? 0 : AT_SYMLINK_NOFOLLOW)) < 0)
  ------------------
  |  |  309|     70|#define AT_EMPTY_PATH           0x1000
  ------------------
                                  (isempty(path) ? AT_EMPTY_PATH : 0) | (follow ? 0 : AT_SYMLINK_NOFOLLOW)) < 0)
  ------------------
  |  |  311|     70|#define AT_SYMLINK_NOFOLLOW     0x100
  ------------------
  |  Branch (39:22): [True: 70, False: 0]
  |  Branch (39:60): [True: 0, False: 70]
  ------------------
   40|      0|                return -errno;
   41|       |
   42|     70|        r = verify_func(&st);
   43|     70|        return verify ? r : r >= 0;
  ------------------
  |  Branch (43:16): [True: 70, False: 0]
  ------------------
   44|     70|}

time-util.c:skip_leading_chars:
  116|  35.3k|static inline char* skip_leading_chars(const char *s, const char *bad) {
  117|  35.3k|        if (!s)
  ------------------
  |  Branch (117:13): [True: 0, False: 35.3k]
  ------------------
  118|      0|                return NULL;
  119|       |
  120|  35.3k|        if (!bad)
  ------------------
  |  Branch (120:13): [True: 35.3k, False: 0]
  ------------------
  121|  35.3k|                bad = WHITESPACE;
  ------------------
  |  |   15|  35.3k|#define WHITESPACE          " \t\n\r"
  ------------------
  122|       |
  123|  35.3k|        return (char*) s + strspn(s, bad);
  124|  35.3k|}
time-util.c:in_charset:
  138|     46|static inline bool _pure_ in_charset(const char *s, const char *charset) {
  139|     46|        assert(s);
  ------------------
  |  |   72|     46|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|     46|        do {                                                            \
  |  |  |  |   59|     46|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|     46|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 46]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|     46|                        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|     46|        } while (false)
  |  |  ------------------
  ------------------
  140|     46|        assert(charset);
  ------------------
  |  |   72|     46|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|     46|        do {                                                            \
  |  |  |  |   59|     46|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|     46|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 46]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|     46|                        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|     46|        } while (false)
  |  |  ------------------
  ------------------
  141|     46|        return s[strspn(s, charset)] == '\0';
  142|     46|}

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

now:
   47|  1.93k|usec_t now(clockid_t clock_id) {
   48|  1.93k|        struct timespec ts;
   49|       |
   50|  1.93k|        assert_se(clock_gettime(map_clock_id(clock_id), &ts) == 0);
  ------------------
  |  |   65|  1.93k|#define assert_se(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.93k|        do {                                                            \
  |  |  |  |   59|  1.93k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.93k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.93k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.93k|                        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|  1.93k|        } while (false)
  |  |  ------------------
  ------------------
   51|       |
   52|  1.93k|        return timespec_load(&ts);
   53|  1.93k|}
timespec_load:
  224|  1.93k|usec_t timespec_load(const struct timespec *ts) {
  225|  1.93k|        assert(ts);
  ------------------
  |  |   72|  1.93k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.93k|        do {                                                            \
  |  |  |  |   59|  1.93k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.93k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.93k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.93k|                        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|  1.93k|        } while (false)
  |  |  ------------------
  ------------------
  226|       |
  227|  1.93k|        if (ts->tv_sec < 0 || ts->tv_nsec < 0)
  ------------------
  |  Branch (227:13): [True: 0, False: 1.93k]
  |  Branch (227:31): [True: 0, False: 1.93k]
  ------------------
  228|      0|                return USEC_INFINITY;
  ------------------
  |  |   35|      0|#define USEC_INFINITY ((usec_t) UINT64_MAX)
  ------------------
  229|       |
  230|  1.93k|        if ((usec_t) ts->tv_sec > (UINT64_MAX - (ts->tv_nsec / NSEC_PER_USEC)) / USEC_PER_SEC)
  ------------------
  |  |   43|  1.93k|#define NSEC_PER_USEC ((nsec_t) 1000ULL)
  ------------------
                      if ((usec_t) ts->tv_sec > (UINT64_MAX - (ts->tv_nsec / NSEC_PER_USEC)) / USEC_PER_SEC)
  ------------------
  |  |   39|  1.93k|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  ------------------
  |  Branch (230:13): [True: 0, False: 1.93k]
  ------------------
  231|      0|                return USEC_INFINITY;
  ------------------
  |  |   35|      0|#define USEC_INFINITY ((usec_t) UINT64_MAX)
  ------------------
  232|       |
  233|  1.93k|        return
  234|  1.93k|                (usec_t) ts->tv_sec * USEC_PER_SEC +
  ------------------
  |  |   39|  1.93k|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  ------------------
  235|  1.93k|                (usec_t) ts->tv_nsec / NSEC_PER_USEC;
  ------------------
  |  |   43|  1.93k|#define NSEC_PER_USEC ((nsec_t) 1000ULL)
  ------------------
  236|  1.93k|}
parse_timestamp:
  983|  1.91k|int parse_timestamp(const char *t, usec_t *ret) {
  984|  1.91k|        ParseTimestampResult *shared, tmp;
  985|  1.91k|        const char *k, *tz, *current_tz;
  986|  1.91k|        size_t max_len, t_len;
  987|  1.91k|        struct tm tm;
  988|  1.91k|        int r;
  989|       |
  990|  1.91k|        assert(t);
  ------------------
  |  |   72|  1.91k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.91k|        do {                                                            \
  |  |  |  |   59|  1.91k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.91k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.91k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.91k|                        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|  1.91k|        } while (false)
  |  |  ------------------
  ------------------
  991|       |
  992|  1.91k|        t_len = strlen(t);
  993|  1.91k|        if (t_len > 2 && t[t_len - 1] == 'Z') {
  ------------------
  |  Branch (993:13): [True: 1.70k, False: 206]
  |  Branch (993:26): [True: 110, False: 1.59k]
  ------------------
  994|       |                /* Try to parse as RFC3339-style welded UTC: "1985-04-12T23:20:50.52Z" */
  995|    110|                r = parse_timestamp_impl(t, t_len - 1, /* utc = */ true, /* isdst = */ -1, /* gmtoff = */ 0, ret);
  996|    110|                if (r >= 0)
  ------------------
  |  Branch (996:21): [True: 1, False: 109]
  ------------------
  997|      1|                        return r;
  998|    110|        }
  999|       |
 1000|  1.90k|        if (t_len > 7 && IN_SET(t[t_len - 6], '+', '-') && t[t_len - 7] != ' ') {  /* RFC3339-style welded offset: "1990-12-31T15:59:60-08:00" */
  ------------------
  |  |  361|  2.85k|        ({                                                              \
  |  |  ------------------
  |  |  |  Branch (361:9): [True: 117, False: 830]
  |  |  ------------------
  |  |  362|  2.85k|                bool _found = false;                                    \
  |  |  363|  2.85k|                /* If the build breaks in the line below, you need to extend the case macros. We use typeof(+x) \
  |  |  364|  2.85k|                 * here to widen the type of x if it is a bit-field as this would otherwise be illegal. */      \
  |  |  365|  2.85k|                static const typeof(+x) __assert_in_set[] _unused_ = { first, __VA_ARGS__ }; \
  |  |  366|  2.85k|                assert_cc(ELEMENTSOF(__assert_in_set) <= 20);           \
  |  |  ------------------
  |  |  |  |  142|    947|#define assert_cc(expr) _Static_assert(expr, #expr)
  |  |  ------------------
  |  |  367|  2.85k|                switch (x) {                                            \
  |  |  368|    117|                FOR_EACH_MAKE_CASE(first, __VA_ARGS__)                  \
  |  |  ------------------
  |  |  |  |  356|     15|        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|     15|#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|     15|                               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|    117|#define  CASE_F_2(X, ...) case X:  CASE_F_1( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  333|    117|#define  CASE_F_1(X)      case X:
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (333:27): [True: 102, False: 845]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (334:27): [True: 15, False: 932]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  357|    117|                               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|    117|                   (__VA_ARGS__)
  |  |  ------------------
  |  |  369|    117|                        _found = true;                                  \
  |  |  370|    117|                        break;                                          \
  |  |  371|    830|                default:                                                \
  |  |  ------------------
  |  |  |  Branch (371:17): [True: 830, False: 117]
  |  |  ------------------
  |  |  372|    830|                        ;                                               \
  |  |  373|  2.85k|                }                                                       \
  |  |  374|  2.85k|                _found;                                                 \
  |  |  375|    947|        })
  ------------------
  |  Branch (1000:13): [True: 947, False: 962]
  |  Branch (1000:60): [True: 116, False: 1]
  ------------------
 1001|    116|                k = strptime(&t[t_len - 6], "%z", &tm);
 1002|    116|                if (k && *k == '\0')
  ------------------
  |  Branch (1002:21): [True: 32, False: 84]
  |  Branch (1002:26): [True: 16, False: 16]
  ------------------
 1003|     16|                        return parse_timestamp_impl(t, t_len - 6, /* utc = */ true, /* isdst = */ -1, /* gmtoff = */ tm.tm_gmtoff, ret);
 1004|    116|        }
 1005|       |
 1006|  1.89k|        tz = strrchr(t, ' ');
 1007|  1.89k|        if (!tz)
  ------------------
  |  Branch (1007:13): [True: 1.57k, False: 322]
  ------------------
 1008|  1.57k|                return parse_timestamp_impl(t, /* max_len = */ SIZE_MAX, /* utc = */ false, /* isdst = */ -1, /* gmtoff = */ 0, ret);
 1009|       |
 1010|    322|        max_len = tz - t;
 1011|    322|        tz++;
 1012|       |
 1013|       |        /* Shortcut, parse the string as UTC. */
 1014|    322|        if (streq(tz, "UTC"))
  ------------------
  |  |   46|    322|#define streq(a,b) (strcmp((a),(b)) == 0)
  |  |  ------------------
  |  |  |  Branch (46:20): [True: 1, False: 321]
  |  |  ------------------
  ------------------
 1015|      1|                return parse_timestamp_impl(t, max_len, /* utc = */ true, /* isdst = */ -1, /* gmtoff = */ 0, ret);
 1016|       |
 1017|       |        /* If the timezone is compatible with RFC-822/ISO 8601 (e.g. +06, or -03:00) then parse the string as
 1018|       |         * UTC and shift the result. Note, this must be earlier than the timezone check with tzname[], as
 1019|       |         * tzname[] may be in the same format. */
 1020|    321|        k = strptime(tz, "%z", &tm);
 1021|    321|        if (k && *k == '\0')
  ------------------
  |  Branch (1021:13): [True: 100, False: 221]
  |  Branch (1021:18): [True: 90, False: 10]
  ------------------
 1022|     90|                return parse_timestamp_impl(t, max_len, /* utc = */ true, /* isdst = */ -1, /* gmtoff = */ tm.tm_gmtoff, ret);
 1023|       |
 1024|       |        /* If the last word is not a timezone file (e.g. Asia/Tokyo), then let's check if it matches
 1025|       |         * tzname[] of the local timezone, e.g. JST or CEST. */
 1026|    231|        if (!timezone_is_valid(tz, LOG_DEBUG))
  ------------------
  |  Branch (1026:13): [True: 166, False: 65]
  ------------------
 1027|    166|                return parse_timestamp_maybe_with_tz(t, tz - t, /* valid_tz = */ false, ret);
 1028|       |
 1029|       |        /* Shortcut. If the current $TZ is equivalent to the specified timezone, it is not necessary to fork
 1030|       |         * the process. */
 1031|     65|        current_tz = getenv("TZ");
 1032|     65|        if (current_tz && *current_tz == ':' && streq(current_tz + 1, tz))
  ------------------
  |  |   46|      0|#define streq(a,b) (strcmp((a),(b)) == 0)
  |  |  ------------------
  |  |  |  Branch (46:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1032:13): [True: 0, False: 65]
  |  Branch (1032:27): [True: 0, False: 0]
  ------------------
 1033|      0|                return parse_timestamp_maybe_with_tz(t, tz - t, /* valid_tz = */ true, ret);
 1034|       |
 1035|       |        /* Otherwise, to avoid polluting the current environment variables, let's fork the process and set
 1036|       |         * the specified timezone in the child process. */
 1037|       |
 1038|     65|        shared = mmap(NULL, sizeof *shared, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0);
 1039|     65|        if (shared == MAP_FAILED)
  ------------------
  |  Branch (1039:13): [True: 0, False: 65]
  ------------------
 1040|      0|                return negative_errno();
 1041|       |
 1042|       |        /* The input string may be in argv. Let's copy it. */
 1043|     65|        _cleanup_free_ char *t_copy = strdup(t);
  ------------------
  |  |   82|     65|#define _cleanup_free_ _cleanup_(freep)
  |  |  ------------------
  |  |  |  |   78|     65|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
 1044|     65|        if (!t_copy)
  ------------------
  |  Branch (1044:13): [True: 0, False: 65]
  ------------------
 1045|      0|                return -ENOMEM;
 1046|       |
 1047|     65|        t = t_copy;
 1048|     65|        assert_se(tz = endswith(t_copy, tz));
  ------------------
  |  |   65|     65|#define assert_se(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|     65|        do {                                                            \
  |  |  |  |   59|     65|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|     65|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 65]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|     65|                        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|     65|        } while (false)
  |  |  ------------------
  ------------------
 1049|       |
 1050|     65|        r = safe_fork("(sd-timestamp)", FORK_RESET_SIGNALS|FORK_CLOSE_ALL_FDS|FORK_DEATHSIG_SIGKILL|FORK_WAIT, NULL);
 1051|     65|        if (r < 0) {
  ------------------
  |  Branch (1051:13): [True: 0, False: 65]
  ------------------
 1052|      0|                (void) munmap(shared, sizeof *shared);
 1053|      0|                return r;
 1054|      0|        }
 1055|     65|        if (r == 0) {
  ------------------
  |  Branch (1055:13): [True: 0, False: 65]
  ------------------
 1056|      0|                const char *colon_tz;
 1057|       |
 1058|       |                /* tzset(3) says $TZ should be prefixed with ":" if we reference timezone files */
 1059|      0|                colon_tz = strjoina(":", tz);
  ------------------
  |  |   94|      0|        ({                                                              \
  |  |   95|      0|                const char *_appendees_[] = { a, __VA_ARGS__ };         \
  |  |   96|      0|                char *_d_, *_p_;                                        \
  |  |   97|      0|                size_t _len_ = 0;                                       \
  |  |   98|      0|                size_t _i_;                                             \
  |  |   99|      0|                for (_i_ = 0; _i_ < ELEMENTSOF(_appendees_) && _appendees_[_i_]; _i_++) \
  |  |  ------------------
  |  |  |  |  134|      0|        (__builtin_choose_expr(                                         \
  |  |  |  |  135|      0|                !__builtin_types_compatible_p(typeof(x), typeof(&*(x))), \
  |  |  |  |  136|      0|                sizeof(x)/sizeof((x)[0]),                               \
  |  |  |  |  137|      0|                VOID_0))
  |  |  |  |  ------------------
  |  |  |  |  |  |  128|      0|#  define VOID_0 ((void)0)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (99:31): [True: 0, False: 0]
  |  |  |  Branch (99:64): [True: 0, False: 0]
  |  |  ------------------
  |  |  100|      0|                        _len_ += strlen(_appendees_[_i_]);              \
  |  |  101|      0|                _p_ = _d_ = newa(char, _len_ + 1);                      \
  |  |  ------------------
  |  |  |  |   29|      0|        ({                                                              \
  |  |  |  |   30|      0|                size_t _n_ = (n);                                       \
  |  |  |  |   31|      0|                assert_se(MUL_ASSIGN_SAFE(&_n_, sizeof(t)));            \
  |  |  |  |  ------------------
  |  |  |  |  |  |   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)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   32|      0|                (t*) alloca_safe(_n_);                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   22|      0|        ({                                                              \
  |  |  |  |  |  |   23|      0|                size_t _nn_ = (n);                                      \
  |  |  |  |  |  |   24|      0|                assert(_nn_ <= ALLOCA_MAX);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   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)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   25|      0|                alloca(_nn_ == 0 ? 1 : _nn_);                           \
  |  |  |  |  |  |   26|      0|        })                                                              \
  |  |  |  |  ------------------
  |  |  |  |   33|      0|        })
  |  |  ------------------
  |  |  102|      0|                for (_i_ = 0; _i_ < ELEMENTSOF(_appendees_) && _appendees_[_i_]; _i_++) \
  |  |  ------------------
  |  |  |  |  134|      0|        (__builtin_choose_expr(                                         \
  |  |  |  |  135|      0|                !__builtin_types_compatible_p(typeof(x), typeof(&*(x))), \
  |  |  |  |  136|      0|                sizeof(x)/sizeof((x)[0]),                               \
  |  |  |  |  137|      0|                VOID_0))
  |  |  |  |  ------------------
  |  |  |  |  |  |  128|      0|#  define VOID_0 ((void)0)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (102:31): [True: 0, False: 0]
  |  |  |  Branch (102:64): [True: 0, False: 0]
  |  |  ------------------
  |  |  103|      0|                        _p_ = stpcpy(_p_, _appendees_[_i_]);            \
  |  |  104|      0|                *_p_ = 0;                                               \
  |  |  105|      0|                _d_;                                                    \
  |  |  106|      0|        })
  ------------------
 1060|       |
 1061|      0|                if (setenv("TZ", colon_tz, 1) != 0) {
  ------------------
  |  Branch (1061:21): [True: 0, False: 0]
  ------------------
 1062|      0|                        shared->return_value = negative_errno();
 1063|      0|                        _exit(EXIT_FAILURE);
 1064|      0|                }
 1065|       |
 1066|      0|                shared->return_value = parse_timestamp_maybe_with_tz(t, tz - t, /* valid_tz = */ true, &shared->usec);
 1067|       |
 1068|      0|                _exit(EXIT_SUCCESS);
 1069|      0|        }
 1070|       |
 1071|     65|        tmp = *shared;
 1072|     65|        if (munmap(shared, sizeof *shared) != 0)
  ------------------
  |  Branch (1072:13): [True: 0, False: 65]
  ------------------
 1073|      0|                return negative_errno();
 1074|       |
 1075|     65|        if (tmp.return_value == 0 && ret)
  ------------------
  |  Branch (1075:13): [True: 5, False: 60]
  |  Branch (1075:38): [True: 5, False: 0]
  ------------------
 1076|      5|                *ret = tmp.usec;
 1077|       |
 1078|     65|        return tmp.return_value;
 1079|     65|}
parse_time:
 1134|  7.82k|int parse_time(const char *t, usec_t *ret, usec_t default_unit) {
 1135|  7.82k|        const char *p, *s;
 1136|       |
 1137|  7.82k|        assert(t);
  ------------------
  |  |   72|  7.82k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  7.82k|        do {                                                            \
  |  |  |  |   59|  7.82k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  7.82k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 7.82k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  7.82k|                        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|  7.82k|        } while (false)
  |  |  ------------------
  ------------------
 1138|  7.82k|        assert(default_unit > 0);
  ------------------
  |  |   72|  7.82k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  7.82k|        do {                                                            \
  |  |  |  |   59|  7.82k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  7.82k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 7.82k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  7.82k|                        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|  7.82k|        } while (false)
  |  |  ------------------
  ------------------
 1139|       |
 1140|  7.82k|        p = skip_leading_chars(t, /* bad = */ NULL);
 1141|  7.82k|        s = startswith(p, "infinity");
 1142|  7.82k|        if (s) {
  ------------------
  |  Branch (1142:13): [True: 46, False: 7.78k]
  ------------------
 1143|     46|                if (!in_charset(s, WHITESPACE))
  ------------------
  |  |   15|     46|#define WHITESPACE          " \t\n\r"
  ------------------
  |  Branch (1143:21): [True: 41, False: 5]
  ------------------
 1144|     41|                        return -EINVAL;
 1145|       |
 1146|      5|                if (ret)
  ------------------
  |  Branch (1146:21): [True: 5, False: 0]
  ------------------
 1147|      5|                        *ret = USEC_INFINITY;
  ------------------
  |  |   35|      5|#define USEC_INFINITY ((usec_t) UINT64_MAX)
  ------------------
 1148|      5|                return 0;
 1149|     46|        }
 1150|       |
 1151|  7.78k|        usec_t usec = 0;
 1152|       |
 1153|  27.5k|        for (bool something = false;;) {
 1154|  27.5k|                usec_t multiplier = default_unit, k;
 1155|  27.5k|                long long l;
 1156|  27.5k|                char *e;
 1157|       |
 1158|  27.5k|                p = skip_leading_chars(p, /* bad = */ NULL);
 1159|  27.5k|                if (*p == 0) {
  ------------------
  |  Branch (1159:21): [True: 2.00k, False: 25.5k]
  ------------------
 1160|  2.00k|                        if (!something)
  ------------------
  |  Branch (1160:29): [True: 11, False: 1.99k]
  ------------------
 1161|     11|                                return -EINVAL;
 1162|       |
 1163|  1.99k|                        break;
 1164|  2.00k|                }
 1165|       |
 1166|  25.5k|                if (*p == '-') /* Don't allow "-0" */
  ------------------
  |  Branch (1166:21): [True: 353, False: 25.2k]
  ------------------
 1167|    353|                        return -ERANGE;
 1168|       |
 1169|  25.2k|                errno = 0;
 1170|  25.2k|                l = strtoll(p, &e, 10);
 1171|  25.2k|                if (errno > 0)
  ------------------
  |  Branch (1171:21): [True: 16, False: 25.1k]
  ------------------
 1172|     16|                        return -errno;
 1173|  25.1k|                if (l < 0)
  ------------------
  |  Branch (1173:21): [True: 318, False: 24.8k]
  ------------------
 1174|    318|                        return -ERANGE;
 1175|       |
 1176|  24.8k|                if (*e == '.') {
  ------------------
  |  Branch (1176:21): [True: 3.42k, False: 21.4k]
  ------------------
 1177|  3.42k|                        p = e + 1;
 1178|  3.42k|                        p += strspn(p, DIGITS);
  ------------------
  |  |   20|  3.42k|#define DIGITS              "0123456789"
  ------------------
 1179|  21.4k|                } else if (e == p)
  ------------------
  |  Branch (1179:28): [True: 2.53k, False: 18.9k]
  ------------------
 1180|  2.53k|                        return -EINVAL;
 1181|  18.9k|                else
 1182|  18.9k|                        p = e;
 1183|       |
 1184|  22.3k|                s = extract_multiplier(p + strspn(p, WHITESPACE), &multiplier);
  ------------------
  |  |   15|  22.3k|#define WHITESPACE          " \t\n\r"
  ------------------
 1185|  22.3k|                if (s == p && *s != '\0')
  ------------------
  |  Branch (1185:21): [True: 3.20k, False: 19.1k]
  |  Branch (1185:31): [True: 2.23k, False: 970]
  ------------------
 1186|       |                        /* Don't allow '12.34.56', but accept '12.34 .56' or '12.34s.56' */
 1187|  2.23k|                        return -EINVAL;
 1188|       |
 1189|  20.1k|                p = s;
 1190|       |
 1191|  20.1k|                if ((usec_t) l >= USEC_INFINITY / multiplier)
  ------------------
  |  |   35|  20.1k|#define USEC_INFINITY ((usec_t) UINT64_MAX)
  ------------------
  |  Branch (1191:21): [True: 209, False: 19.9k]
  ------------------
 1192|    209|                        return -ERANGE;
 1193|       |
 1194|  19.9k|                k = (usec_t) l * multiplier;
 1195|  19.9k|                if (k >= USEC_INFINITY - usec)
  ------------------
  |  |   35|  19.9k|#define USEC_INFINITY ((usec_t) UINT64_MAX)
  ------------------
  |  Branch (1195:21): [True: 9, False: 19.8k]
  ------------------
 1196|      9|                        return -ERANGE;
 1197|       |
 1198|  19.8k|                usec += k;
 1199|       |
 1200|  19.8k|                something = true;
 1201|       |
 1202|  19.8k|                if (*e == '.') {
  ------------------
  |  Branch (1202:21): [True: 3.42k, False: 16.4k]
  ------------------
 1203|  3.42k|                        usec_t m = multiplier / 10;
 1204|  3.42k|                        const char *b;
 1205|       |
 1206|  41.1k|                        for (b = e + 1; *b >= '0' && *b <= '9'; b++, m /= 10) {
  ------------------
  |  Branch (1206:41): [True: 38.2k, False: 2.86k]
  |  Branch (1206:54): [True: 37.6k, False: 556]
  ------------------
 1207|  37.6k|                                k = (usec_t) (*b - '0') * m;
 1208|  37.6k|                                if (k >= USEC_INFINITY - usec)
  ------------------
  |  |   35|  37.6k|#define USEC_INFINITY ((usec_t) UINT64_MAX)
  ------------------
  |  Branch (1208:37): [True: 5, False: 37.6k]
  ------------------
 1209|      5|                                        return -ERANGE;
 1210|       |
 1211|  37.6k|                                usec += k;
 1212|  37.6k|                        }
 1213|       |
 1214|       |                        /* Don't allow "0.-0", "3.+1", "3. 1", "3.sec" or "3.hoge" */
 1215|  3.42k|                        if (b == e + 1)
  ------------------
  |  Branch (1215:29): [True: 105, False: 3.31k]
  ------------------
 1216|    105|                                return -EINVAL;
 1217|  3.42k|                }
 1218|  19.8k|        }
 1219|       |
 1220|  1.99k|        if (ret)
  ------------------
  |  Branch (1220:13): [True: 1.99k, False: 0]
  ------------------
 1221|  1.99k|                *ret = usec;
 1222|  1.99k|        return 0;
 1223|  7.78k|}
parse_sec:
 1225|  5.91k|int parse_sec(const char *t, usec_t *ret) {
 1226|  5.91k|        return parse_time(t, ret, USEC_PER_SEC);
  ------------------
  |  |   39|  5.91k|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  ------------------
 1227|  5.91k|}
parse_sec_fix_0:
 1229|  1.91k|int parse_sec_fix_0(const char *t, usec_t *ret) {
 1230|  1.91k|        usec_t k;
 1231|  1.91k|        int r;
 1232|       |
 1233|  1.91k|        assert(t);
  ------------------
  |  |   72|  1.91k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.91k|        do {                                                            \
  |  |  |  |   59|  1.91k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.91k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.91k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.91k|                        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|  1.91k|        } while (false)
  |  |  ------------------
  ------------------
 1234|  1.91k|        assert(ret);
  ------------------
  |  |   72|  1.91k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.91k|        do {                                                            \
  |  |  |  |   59|  1.91k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.91k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.91k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.91k|                        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|  1.91k|        } while (false)
  |  |  ------------------
  ------------------
 1235|       |
 1236|  1.91k|        r = parse_sec(t, &k);
 1237|  1.91k|        if (r < 0)
  ------------------
  |  Branch (1237:13): [True: 1.44k, False: 467]
  ------------------
 1238|  1.44k|                return r;
 1239|       |
 1240|    467|        *ret = k == 0 ? USEC_INFINITY : k;
  ------------------
  |  |   35|      5|#define USEC_INFINITY ((usec_t) UINT64_MAX)
  ------------------
  |  Branch (1240:16): [True: 5, False: 462]
  ------------------
 1241|    467|        return r;
 1242|  1.91k|}
parse_sec_def_infinity:
 1244|  1.91k|int parse_sec_def_infinity(const char *t, usec_t *ret) {
 1245|  1.91k|        assert(t);
  ------------------
  |  |   72|  1.91k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.91k|        do {                                                            \
  |  |  |  |   59|  1.91k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.91k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.91k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.91k|                        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|  1.91k|        } while (false)
  |  |  ------------------
  ------------------
 1246|  1.91k|        assert(ret);
  ------------------
  |  |   72|  1.91k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.91k|        do {                                                            \
  |  |  |  |   59|  1.91k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.91k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.91k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.91k|                        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|  1.91k|        } while (false)
  |  |  ------------------
  ------------------
 1247|       |
 1248|  1.91k|        t += strspn(t, WHITESPACE);
  ------------------
  |  |   15|  1.91k|#define WHITESPACE          " \t\n\r"
  ------------------
 1249|  1.91k|        if (isempty(t)) {
  ------------------
  |  Branch (1249:13): [True: 2, False: 1.90k]
  ------------------
 1250|      2|                *ret = USEC_INFINITY;
  ------------------
  |  |   35|      2|#define USEC_INFINITY ((usec_t) UINT64_MAX)
  ------------------
 1251|      2|                return 0;
 1252|      2|        }
 1253|  1.90k|        return parse_sec(t, ret);
 1254|  1.91k|}
parse_nsec:
 1312|  1.91k|int parse_nsec(const char *t, nsec_t *ret) {
 1313|  1.91k|        const char *p, *s;
 1314|  1.91k|        nsec_t nsec = 0;
 1315|  1.91k|        bool something = false;
 1316|       |
 1317|  1.91k|        assert(t);
  ------------------
  |  |   72|  1.91k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.91k|        do {                                                            \
  |  |  |  |   59|  1.91k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.91k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.91k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.91k|                        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|  1.91k|        } while (false)
  |  |  ------------------
  ------------------
 1318|  1.91k|        assert(ret);
  ------------------
  |  |   72|  1.91k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.91k|        do {                                                            \
  |  |  |  |   59|  1.91k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.91k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.91k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.91k|                        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|  1.91k|        } while (false)
  |  |  ------------------
  ------------------
 1319|       |
 1320|  1.91k|        p = t;
 1321|       |
 1322|  1.91k|        p += strspn(p, WHITESPACE);
  ------------------
  |  |   15|  1.91k|#define WHITESPACE          " \t\n\r"
  ------------------
 1323|  1.91k|        s = startswith(p, "infinity");
 1324|  1.91k|        if (s) {
  ------------------
  |  Branch (1324:13): [True: 11, False: 1.89k]
  ------------------
 1325|     11|                s += strspn(s, WHITESPACE);
  ------------------
  |  |   15|     11|#define WHITESPACE          " \t\n\r"
  ------------------
 1326|     11|                if (*s != 0)
  ------------------
  |  Branch (1326:21): [True: 10, False: 1]
  ------------------
 1327|     10|                        return -EINVAL;
 1328|       |
 1329|      1|                *ret = NSEC_INFINITY;
  ------------------
  |  |   36|      1|#define NSEC_INFINITY ((nsec_t) UINT64_MAX)
  ------------------
 1330|      1|                return 0;
 1331|     11|        }
 1332|       |
 1333|  6.59k|        for (;;) {
 1334|  6.59k|                nsec_t multiplier = 1, k;
 1335|  6.59k|                long long l;
 1336|  6.59k|                char *e;
 1337|       |
 1338|  6.59k|                p += strspn(p, WHITESPACE);
  ------------------
  |  |   15|  6.59k|#define WHITESPACE          " \t\n\r"
  ------------------
 1339|       |
 1340|  6.59k|                if (*p == 0) {
  ------------------
  |  Branch (1340:21): [True: 329, False: 6.26k]
  ------------------
 1341|    329|                        if (!something)
  ------------------
  |  Branch (1341:29): [True: 2, False: 327]
  ------------------
 1342|      2|                                return -EINVAL;
 1343|       |
 1344|    327|                        break;
 1345|    329|                }
 1346|       |
 1347|  6.26k|                if (*p == '-') /* Don't allow "-0" */
  ------------------
  |  Branch (1347:21): [True: 86, False: 6.17k]
  ------------------
 1348|     86|                        return -ERANGE;
 1349|       |
 1350|  6.17k|                errno = 0;
 1351|  6.17k|                l = strtoll(p, &e, 10);
 1352|  6.17k|                if (errno > 0)
  ------------------
  |  Branch (1352:21): [True: 3, False: 6.17k]
  ------------------
 1353|      3|                        return -errno;
 1354|  6.17k|                if (l < 0)
  ------------------
  |  Branch (1354:21): [True: 79, False: 6.09k]
  ------------------
 1355|     79|                        return -ERANGE;
 1356|       |
 1357|  6.09k|                if (*e == '.') {
  ------------------
  |  Branch (1357:21): [True: 829, False: 5.26k]
  ------------------
 1358|    829|                        p = e + 1;
 1359|    829|                        p += strspn(p, DIGITS);
  ------------------
  |  |   20|    829|#define DIGITS              "0123456789"
  ------------------
 1360|  5.26k|                } else if (e == p)
  ------------------
  |  Branch (1360:28): [True: 628, False: 4.64k]
  ------------------
 1361|    628|                        return -EINVAL;
 1362|  4.64k|                else
 1363|  4.64k|                        p = e;
 1364|       |
 1365|  5.46k|                s = extract_nsec_multiplier(p + strspn(p, WHITESPACE), &multiplier);
  ------------------
  |  |   15|  5.46k|#define WHITESPACE          " \t\n\r"
  ------------------
 1366|  5.46k|                if (s == p && *s != '\0')
  ------------------
  |  Branch (1366:21): [True: 758, False: 4.71k]
  |  Branch (1366:31): [True: 553, False: 205]
  ------------------
 1367|       |                        /* Don't allow '12.34.56', but accept '12.34 .56' or '12.34s.56' */
 1368|    553|                        return -EINVAL;
 1369|       |
 1370|  4.91k|                p = s;
 1371|       |
 1372|  4.91k|                if ((nsec_t) l >= NSEC_INFINITY / multiplier)
  ------------------
  |  |   36|  4.91k|#define NSEC_INFINITY ((nsec_t) UINT64_MAX)
  ------------------
  |  Branch (1372:21): [True: 193, False: 4.72k]
  ------------------
 1373|    193|                        return -ERANGE;
 1374|       |
 1375|  4.72k|                k = (nsec_t) l * multiplier;
 1376|  4.72k|                if (k >= NSEC_INFINITY - nsec)
  ------------------
  |  |   36|  4.72k|#define NSEC_INFINITY ((nsec_t) UINT64_MAX)
  ------------------
  |  Branch (1376:21): [True: 2, False: 4.72k]
  ------------------
 1377|      2|                        return -ERANGE;
 1378|       |
 1379|  4.72k|                nsec += k;
 1380|       |
 1381|  4.72k|                something = true;
 1382|       |
 1383|  4.72k|                if (*e == '.') {
  ------------------
  |  Branch (1383:21): [True: 808, False: 3.91k]
  ------------------
 1384|    808|                        nsec_t m = multiplier / 10;
 1385|    808|                        const char *b;
 1386|       |
 1387|  10.1k|                        for (b = e + 1; *b >= '0' && *b <= '9'; b++, m /= 10) {
  ------------------
  |  Branch (1387:41): [True: 9.42k, False: 696]
  |  Branch (1387:54): [True: 9.31k, False: 110]
  ------------------
 1388|  9.31k|                                k = (nsec_t) (*b - '0') * m;
 1389|  9.31k|                                if (k >= NSEC_INFINITY - nsec)
  ------------------
  |  |   36|  9.31k|#define NSEC_INFINITY ((nsec_t) UINT64_MAX)
  ------------------
  |  Branch (1389:37): [True: 2, False: 9.31k]
  ------------------
 1390|      2|                                        return -ERANGE;
 1391|       |
 1392|  9.31k|                                nsec += k;
 1393|  9.31k|                        }
 1394|       |
 1395|       |                        /* Don't allow "0.-0", "3.+1", "3. 1", "3.sec" or "3.hoge" */
 1396|    806|                        if (b == e + 1)
  ------------------
  |  Branch (1396:29): [True: 24, False: 782]
  ------------------
 1397|     24|                                return -EINVAL;
 1398|    806|                }
 1399|  4.72k|        }
 1400|       |
 1401|    327|        *ret = nsec;
 1402|       |
 1403|    327|        return 0;
 1404|  1.89k|}
verify_timezone:
 1526|  2.14k|int verify_timezone(const char *name, int log_level) {
 1527|  2.14k|        bool slash = false;
 1528|  2.14k|        const char *p, *t;
 1529|  2.14k|        _cleanup_close_ int fd = -EBADF;
  ------------------
  |  |   60|  2.14k|#define _cleanup_close_ _cleanup_(closep)
  |  |  ------------------
  |  |  |  |   78|  2.14k|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
 1530|  2.14k|        char buf[4];
 1531|  2.14k|        int r;
 1532|       |
 1533|  2.14k|        if (isempty(name))
  ------------------
  |  Branch (1533:13): [True: 23, False: 2.11k]
  ------------------
 1534|     23|                return -EINVAL;
 1535|       |
 1536|       |        /* Always accept "UTC" as valid timezone, since it's the fallback, even if user has no timezones installed. */
 1537|  2.11k|        if (streq(name, "UTC"))
  ------------------
  |  |   46|  2.11k|#define streq(a,b) (strcmp((a),(b)) == 0)
  |  |  ------------------
  |  |  |  Branch (46:20): [True: 1, False: 2.11k]
  |  |  ------------------
  ------------------
 1538|      1|                return 0;
 1539|       |
 1540|  2.11k|        if (name[0] == '/')
  ------------------
  |  Branch (1540:13): [True: 8, False: 2.10k]
  ------------------
 1541|      8|                return -EINVAL;
 1542|       |
 1543|  2.38M|        for (p = name; *p; p++) {
  ------------------
  |  Branch (1543:24): [True: 2.38M, False: 941]
  ------------------
 1544|  2.38M|                if (!ascii_isdigit(*p) &&
  ------------------
  |  Branch (1544:21): [True: 192k, False: 2.19M]
  ------------------
 1545|  2.38M|                    !ascii_isalpha(*p) &&
  ------------------
  |  Branch (1545:21): [True: 22.0k, False: 170k]
  ------------------
 1546|  2.38M|                    !IN_SET(*p, '-', '_', '+', '/'))
  ------------------
  |  |  361|  22.0k|        ({                                                              \
  |  |  362|  22.0k|                bool _found = false;                                    \
  |  |  363|  22.0k|                /* If the build breaks in the line below, you need to extend the case macros. We use typeof(+x) \
  |  |  364|  22.0k|                 * here to widen the type of x if it is a bit-field as this would otherwise be illegal. */      \
  |  |  365|  22.0k|                static const typeof(+x) __assert_in_set[] _unused_ = { first, __VA_ARGS__ }; \
  |  |  366|  22.0k|                assert_cc(ELEMENTSOF(__assert_in_set) <= 20);           \
  |  |  ------------------
  |  |  |  |  142|  22.0k|#define assert_cc(expr) _Static_assert(expr, #expr)
  |  |  ------------------
  |  |  367|  22.0k|                switch (x) {                                            \
  |  |  368|  20.9k|                FOR_EACH_MAKE_CASE(first, __VA_ARGS__)                  \
  |  |  ------------------
  |  |  |  |  356|  16.2k|        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|  16.2k|#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|  16.2k|                               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|  18.3k|#define  CASE_F_4(X, ...) case X:  CASE_F_3( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  335|  18.7k|#define  CASE_F_3(X, ...) case X:  CASE_F_2( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  334|  20.9k|#define  CASE_F_2(X, ...) case X:  CASE_F_1( __VA_ARGS__)
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  333|  20.9k|#define  CASE_F_1(X)      case X:
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (333:27): [True: 2.18k, False: 19.8k]
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (334:27): [True: 417, False: 21.6k]
  |  |  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (335:27): [True: 2.07k, False: 20.0k]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (336:27): [True: 16.2k, False: 5.84k]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  357|  20.9k|                               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|  20.9k|                   (__VA_ARGS__)
  |  |  ------------------
  |  |  369|  20.9k|                        _found = true;                                  \
  |  |  370|  20.9k|                        break;                                          \
  |  |  371|  53.2k|                default:                                                \
  |  |  ------------------
  |  |  |  Branch (371:17): [True: 1.16k, False: 20.9k]
  |  |  ------------------
  |  |  372|  1.16k|                        ;                                               \
  |  |  373|  22.0k|                }                                                       \
  |  |  374|  22.0k|                _found;                                                 \
  |  |  375|  22.0k|        })
  ------------------
  |  Branch (1546:21): [True: 1.16k, False: 20.9k]
  ------------------
 1547|  1.16k|                        return -EINVAL;
 1548|       |
 1549|  2.38M|                if (*p == '/') {
  ------------------
  |  Branch (1549:21): [True: 2.18k, False: 2.38M]
  ------------------
 1550|       |
 1551|  2.18k|                        if (slash)
  ------------------
  |  Branch (1551:29): [True: 3, False: 2.18k]
  ------------------
 1552|      3|                                return -EINVAL;
 1553|       |
 1554|  2.18k|                        slash = true;
 1555|  2.18k|                } else
 1556|  2.38M|                        slash = false;
 1557|  2.38M|        }
 1558|       |
 1559|    941|        if (slash)
  ------------------
  |  Branch (1559:13): [True: 12, False: 929]
  ------------------
 1560|     12|                return -EINVAL;
 1561|       |
 1562|    929|        if (p - name >= PATH_MAX)
  ------------------
  |  Branch (1562:13): [True: 9, False: 920]
  ------------------
 1563|      9|                return -ENAMETOOLONG;
 1564|       |
 1565|    920|        t = strjoina("/usr/share/zoneinfo/", name);
  ------------------
  |  |   94|    920|        ({                                                              \
  |  |   95|    920|                const char *_appendees_[] = { a, __VA_ARGS__ };         \
  |  |   96|    920|                char *_d_, *_p_;                                        \
  |  |   97|    920|                size_t _len_ = 0;                                       \
  |  |   98|    920|                size_t _i_;                                             \
  |  |   99|  2.76k|                for (_i_ = 0; _i_ < ELEMENTSOF(_appendees_) && _appendees_[_i_]; _i_++) \
  |  |  ------------------
  |  |  |  |  134|  5.52k|        (__builtin_choose_expr(                                         \
  |  |  |  |  135|  5.52k|                !__builtin_types_compatible_p(typeof(x), typeof(&*(x))), \
  |  |  |  |  136|  5.52k|                sizeof(x)/sizeof((x)[0]),                               \
  |  |  |  |  137|  5.52k|                VOID_0))
  |  |  |  |  ------------------
  |  |  |  |  |  |  128|  2.76k|#  define VOID_0 ((void)0)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (99:31): [True: 1.84k, False: 920]
  |  |  |  Branch (99:64): [True: 1.84k, False: 0]
  |  |  ------------------
  |  |  100|  1.84k|                        _len_ += strlen(_appendees_[_i_]);              \
  |  |  101|    920|                _p_ = _d_ = newa(char, _len_ + 1);                      \
  |  |  ------------------
  |  |  |  |   29|    920|        ({                                                              \
  |  |  |  |   30|    920|                size_t _n_ = (n);                                       \
  |  |  |  |   31|    920|                assert_se(MUL_ASSIGN_SAFE(&_n_, sizeof(t)));            \
  |  |  |  |  ------------------
  |  |  |  |  |  |   65|    920|#define assert_se(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|    920|        do {                                                            \
  |  |  |  |  |  |  |  |   59|    920|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   95|    920|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 920]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    920|                        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|    920|        } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   32|    920|                (t*) alloca_safe(_n_);                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   22|    920|        ({                                                              \
  |  |  |  |  |  |   23|    920|                size_t _nn_ = (n);                                      \
  |  |  |  |  |  |   24|    920|                assert(_nn_ <= ALLOCA_MAX);                             \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   72|    920|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   58|    920|        do {                                                            \
  |  |  |  |  |  |  |  |  |  |   59|    920|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |   95|    920|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 920]
  |  |  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   60|    920|                        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|    920|        } while (false)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |   25|    920|                alloca(_nn_ == 0 ? 1 : _nn_);                           \
  |  |  |  |  |  |   26|    920|        })                                                              \
  |  |  |  |  ------------------
  |  |  |  |   33|    920|        })
  |  |  ------------------
  |  |  102|  2.76k|                for (_i_ = 0; _i_ < ELEMENTSOF(_appendees_) && _appendees_[_i_]; _i_++) \
  |  |  ------------------
  |  |  |  |  134|  5.52k|        (__builtin_choose_expr(                                         \
  |  |  |  |  135|  5.52k|                !__builtin_types_compatible_p(typeof(x), typeof(&*(x))), \
  |  |  |  |  136|  5.52k|                sizeof(x)/sizeof((x)[0]),                               \
  |  |  |  |  137|  5.52k|                VOID_0))
  |  |  |  |  ------------------
  |  |  |  |  |  |  128|  2.76k|#  define VOID_0 ((void)0)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (102:31): [True: 1.84k, False: 920]
  |  |  |  Branch (102:64): [True: 1.84k, False: 0]
  |  |  ------------------
  |  |  103|  1.84k|                        _p_ = stpcpy(_p_, _appendees_[_i_]);            \
  |  |  104|    920|                *_p_ = 0;                                               \
  |  |  105|    920|                _d_;                                                    \
  |  |  106|    920|        })
  ------------------
 1566|       |
 1567|    920|        fd = open(t, O_RDONLY|O_CLOEXEC);
 1568|    920|        if (fd < 0)
  ------------------
  |  Branch (1568:13): [True: 850, False: 70]
  ------------------
 1569|    850|                return log_full_errno(log_level, errno, "Failed to open timezone file '%s': %m", t);
  ------------------
  |  |  204|    850|        ({                                                              \
  |  |  205|    850|                int _error = (error);                                   \
  |  |  206|    850|                ASSERT_NON_ZERO(_error);                                \
  |  |  ------------------
  |  |  |  |  198|    850|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|    850|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|    850|        do {                                                            \
  |  |  |  |  |  |  |  |   59|    850|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   95|    850|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 850]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    850|                        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|    850|        } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  207|    850|                log_full_errno_zerook(level, _error, __VA_ARGS__);      \
  |  |  ------------------
  |  |  |  |  189|    850|        ({                                                              \
  |  |  |  |  190|    850|                int _level = (level), _e = (error);                     \
  |  |  |  |  191|    850|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (191:22): [True: 0, False: 850]
  |  |  |  |  ------------------
  |  |  |  |  192|    850|                        ? 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|    850|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|  1.70k|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|    850|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  194|    850|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:17): [True: 850, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  195|    850|        })
  |  |  ------------------
  |  |  208|    850|        })
  ------------------
 1570|       |
 1571|     70|        r = fd_verify_regular(fd);
 1572|     70|        if (r < 0)
  ------------------
  |  Branch (1572:13): [True: 2, False: 68]
  ------------------
 1573|      2|                return log_full_errno(log_level, r, "Timezone file '%s' is not a regular file: %m", t);
  ------------------
  |  |  204|      2|        ({                                                              \
  |  |  205|      2|                int _error = (error);                                   \
  |  |  206|      2|                ASSERT_NON_ZERO(_error);                                \
  |  |  ------------------
  |  |  |  |  198|      2|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      2|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|      2|        do {                                                            \
  |  |  |  |  |  |  |  |   59|      2|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   95|      2|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 2]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      2|                        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|      2|        } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  207|      2|                log_full_errno_zerook(level, _error, __VA_ARGS__);      \
  |  |  ------------------
  |  |  |  |  189|      2|        ({                                                              \
  |  |  |  |  190|      2|                int _level = (level), _e = (error);                     \
  |  |  |  |  191|      2|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (191:22): [True: 0, False: 2]
  |  |  |  |  ------------------
  |  |  |  |  192|      2|                        ? 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|      2|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      4|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      2|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  194|      2|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:17): [True: 2, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  195|      2|        })
  |  |  ------------------
  |  |  208|      2|        })
  ------------------
 1574|       |
 1575|     68|        r = loop_read_exact(fd, buf, 4, false);
 1576|     68|        if (r < 0)
  ------------------
  |  Branch (1576:13): [True: 0, False: 68]
  ------------------
 1577|      0|                return log_full_errno(log_level, r, "Failed to read from timezone file '%s': %m", t);
  ------------------
  |  |  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|        })
  ------------------
 1578|       |
 1579|       |        /* Magic from tzfile(5) */
 1580|     68|        if (memcmp(buf, "TZif", 4) != 0)
  ------------------
  |  Branch (1580:13): [True: 2, False: 66]
  ------------------
 1581|      2|                return log_full_errno(log_level, SYNTHETIC_ERRNO(EBADMSG),
  ------------------
  |  |  204|      2|        ({                                                              \
  |  |  205|      2|                int _error = (error);                                   \
  |  |  206|      2|                ASSERT_NON_ZERO(_error);                                \
  |  |  ------------------
  |  |  |  |  198|      2|#  define ASSERT_NON_ZERO(x) assert((x) != 0)
  |  |  |  |  ------------------
  |  |  |  |  |  |   72|      2|#define assert(expr) assert_message_se(expr, #expr)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   58|      2|        do {                                                            \
  |  |  |  |  |  |  |  |   59|      2|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   95|      2|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 2]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      2|                        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|      2|        } while (false)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  207|      2|                log_full_errno_zerook(level, _error, __VA_ARGS__);      \
  |  |  ------------------
  |  |  |  |  189|      2|        ({                                                              \
  |  |  |  |  190|      2|                int _level = (level), _e = (error);                     \
  |  |  |  |  191|      2|                _e = (log_get_max_level() >= LOG_PRI(_level))           \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (191:22): [True: 0, False: 2]
  |  |  |  |  ------------------
  |  |  |  |  192|      2|                        ? 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|      2|                        : -ERRNO_VALUE(_e);                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   36|      4|#define ERRNO_VALUE(val)                    (ABS(val) & ~(1 << 30))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  172|      2|#  define ABS(a) __builtin_llabs(a)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  194|      2|                _e < 0 ? _e : -ESTRPIPE;                                \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (194:17): [True: 2, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  195|      2|        })
  |  |  ------------------
  |  |  208|      2|        })
  ------------------
 1582|     68|                                      "Timezone file '%s' has wrong magic bytes", t);
 1583|       |
 1584|     66|        return 0;
 1585|     68|}
mktime_or_timegm_usec:
 1629|    397|                usec_t *ret) {
 1630|       |
 1631|    397|        time_t t;
 1632|       |
 1633|    397|        assert(tm);
  ------------------
  |  |   72|    397|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|    397|        do {                                                            \
  |  |  |  |   59|    397|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|    397|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 397]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|    397|                        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|    397|        } while (false)
  |  |  ------------------
  ------------------
 1634|       |
 1635|    397|        if (tm->tm_year < 69) /* early check for negative (i.e. before 1970) time_t (Note that in some timezones the epoch is in the year 1969!) */
  ------------------
  |  Branch (1635:13): [True: 45, False: 352]
  ------------------
 1636|     45|                return -ERANGE;
 1637|    352|        if ((usec_t) tm->tm_year > CONST_MIN(USEC_INFINITY / USEC_PER_YEAR, (usec_t) TIME_T_MAX / (365U * 24U * 60U * 60U)) - 1900) /* early check for possible overrun of usec_t or time_t */
  ------------------
  |  |  230|    352|        (__builtin_choose_expr(                                         \
  |  |  231|    352|                __builtin_constant_p(_A) &&                             \
  |  |  ------------------
  |  |  |  Branch (231:17): [Folded - Ignored]
  |  |  ------------------
  |  |  232|    352|                __builtin_constant_p(_B) &&                             \
  |  |  ------------------
  |  |  |  Branch (232:17): [Folded - Ignored]
  |  |  ------------------
  |  |  233|    352|                __builtin_types_compatible_p(typeof(_A), typeof(_B)),   \
  |  |  ------------------
  |  |  |  Branch (233:17): [Folded - Ignored]
  |  |  ------------------
  |  |  234|    352|                ((_A) < (_B)) ? (_A) : (_B),                            \
  |  |  ------------------
  |  |  |  Branch (234:17): [Folded - Ignored]
  |  |  ------------------
  |  |  235|    352|                VOID_0))
  |  |  ------------------
  |  |  |  |  128|    352|#  define VOID_0 ((void)0)
  |  |  ------------------
  ------------------
  |  Branch (1637:13): [True: 0, False: 352]
  ------------------
 1638|      0|                return -ERANGE;
 1639|       |
 1640|       |        /* timegm()/mktime() is a bit weird to use, since it returns -1 in two cases: on error as well as a
 1641|       |         * valid time indicating one second before the UNIX epoch. Let's treat both cases the same here, and
 1642|       |         * return -ERANGE for anything negative, since usec_t is unsigned, and we can thus not express
 1643|       |         * negative times anyway. */
 1644|       |
 1645|    352|        t = utc ? timegm(tm) : mktime(tm);
  ------------------
  |  Branch (1645:13): [True: 55, False: 297]
  ------------------
 1646|    352|        if (t < 0) /* Refuse negative times and errors */
  ------------------
  |  Branch (1646:13): [True: 58, False: 294]
  ------------------
 1647|     58|                return -ERANGE;
 1648|    294|        if ((usec_t) t >= USEC_INFINITY / USEC_PER_SEC) /* Never return USEC_INFINITY by accident (or overflow) */
  ------------------
  |  |   35|    294|#define USEC_INFINITY ((usec_t) UINT64_MAX)
  ------------------
                      if ((usec_t) t >= USEC_INFINITY / USEC_PER_SEC) /* Never return USEC_INFINITY by accident (or overflow) */
  ------------------
  |  |   39|    294|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  ------------------
  |  Branch (1648:13): [True: 0, False: 294]
  ------------------
 1649|      0|                return -ERANGE;
 1650|       |
 1651|    294|        if (ret)
  ------------------
  |  Branch (1651:13): [True: 294, False: 0]
  ------------------
 1652|    294|                *ret = (usec_t) t * USEC_PER_SEC;
  ------------------
  |  |   39|    294|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  ------------------
 1653|    294|        return 0;
 1654|    294|}
localtime_or_gmtime_usec:
 1659|  1.74k|                struct tm *ret) {
 1660|       |
 1661|  1.74k|        t /= USEC_PER_SEC; /* Round down */
  ------------------
  |  |   39|  1.74k|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  ------------------
 1662|  1.74k|        if (t > (usec_t) TIME_T_MAX)
  ------------------
  |  |   64|  1.74k|#define TIME_T_MAX (time_t)((UINTMAX_C(1) << ((sizeof(time_t) << 3) - 1)) - 1)
  ------------------
  |  Branch (1662:13): [True: 0, False: 1.74k]
  ------------------
 1663|      0|                return -ERANGE;
 1664|  1.74k|        time_t sec = (time_t) t;
 1665|       |
 1666|  1.74k|        struct tm buf = {};
 1667|  1.74k|        if (!(utc ? gmtime_r(&sec, &buf) : localtime_r(&sec, &buf)))
  ------------------
  |  Branch (1667:13): [True: 0, False: 1.74k]
  |  Branch (1667:15): [True: 201, False: 1.54k]
  ------------------
 1668|      0|                return -EINVAL;
 1669|       |
 1670|  1.74k|        if (ret)
  ------------------
  |  Branch (1670:13): [True: 1.74k, False: 0]
  ------------------
 1671|  1.74k|                *ret = buf;
 1672|       |
 1673|  1.74k|        return 0;
 1674|  1.74k|}
time-util.c:map_clock_id:
   27|  1.93k|static clockid_t map_clock_id(clockid_t c) {
   28|       |
   29|       |        /* Some more exotic archs (s390, ppc, …) lack the "ALARM" flavour of the clocks. Thus,
   30|       |         * clock_gettime() will fail for them. Since they are essentially the same as their non-ALARM
   31|       |         * pendants (their only difference is when timers are set on them), let's just map them
   32|       |         * accordingly. This way, we can get the correct time even on those archs. */
   33|       |
   34|  1.93k|        switch (c) {
   35|       |
   36|      0|        case CLOCK_BOOTTIME_ALARM:
  ------------------
  |  Branch (36:9): [True: 0, False: 1.93k]
  ------------------
   37|      0|                return CLOCK_BOOTTIME;
   38|       |
   39|      0|        case CLOCK_REALTIME_ALARM:
  ------------------
  |  Branch (39:9): [True: 0, False: 1.93k]
  ------------------
   40|      0|                return CLOCK_REALTIME;
   41|       |
   42|  1.93k|        default:
  ------------------
  |  Branch (42:9): [True: 1.93k, False: 0]
  ------------------
   43|  1.93k|                return c;
   44|  1.93k|        }
   45|  1.93k|}
time-util.c:parse_timestamp_impl:
  632|  1.95k|                usec_t *ret) {
  633|       |
  634|  1.95k|        static const struct {
  635|  1.95k|                const char *name;
  636|  1.95k|                const int nr;
  637|  1.95k|        } day_nr[] = {
  638|  1.95k|                { "Sunday",    0 },
  639|  1.95k|                { "Sun",       0 },
  640|  1.95k|                { "Monday",    1 },
  641|  1.95k|                { "Mon",       1 },
  642|  1.95k|                { "Tuesday",   2 },
  643|  1.95k|                { "Tue",       2 },
  644|  1.95k|                { "Wednesday", 3 },
  645|  1.95k|                { "Wed",       3 },
  646|  1.95k|                { "Thursday",  4 },
  647|  1.95k|                { "Thu",       4 },
  648|  1.95k|                { "Friday",    5 },
  649|  1.95k|                { "Fri",       5 },
  650|  1.95k|                { "Saturday",  6 },
  651|  1.95k|                { "Sat",       6 },
  652|  1.95k|        };
  653|       |
  654|  1.95k|        _cleanup_free_ char *t_alloc = NULL;
  ------------------
  |  |   82|  1.95k|#define _cleanup_free_ _cleanup_(freep)
  |  |  ------------------
  |  |  |  |   78|  1.95k|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
  655|  1.95k|        usec_t usec, plus = 0, minus = 0;
  656|  1.95k|        bool with_tz = false;
  657|  1.95k|        int r, weekday = -1;
  658|  1.95k|        unsigned fractional = 0;
  659|  1.95k|        const char *k;
  660|  1.95k|        struct tm tm, copy;
  661|       |
  662|       |        /* Allowed syntaxes:
  663|       |         *
  664|       |         *   2012-09-22 16:34:22.1[2[3[4[5[6]]]]]
  665|       |         *   2012-09-22 16:34:22  (µsec will be set to 0)
  666|       |         *   2012-09-22 16:34     (seconds will be set to 0)
  667|       |         *   2012-09-22T16:34:22.1[2[3[4[5[6]]]]]
  668|       |         *   2012-09-22T16:34:22  (µsec will be set to 0)
  669|       |         *   2012-09-22T16:34     (seconds will be set to 0)
  670|       |         *   2012-09-22           (time will be set to 00:00:00)
  671|       |         *   16:34:22             (date will be set to today)
  672|       |         *   16:34                (date will be set to today, seconds to 0)
  673|       |         *   now
  674|       |         *   yesterday            (time is set to 00:00:00)
  675|       |         *   today                (time is set to 00:00:00)
  676|       |         *   tomorrow             (time is set to 00:00:00)
  677|       |         *   +5min
  678|       |         *   -5days
  679|       |         *   @2147483647          (seconds since epoch)
  680|       |         *
  681|       |         * Note, on DST change, 00:00:00 may not exist and in that case the time part may be shifted.
  682|       |         * E.g. "Sun 2023-03-13 America/Havana" is parsed as "Sun 2023-03-13 01:00:00 CDT".
  683|       |         *
  684|       |         * A simplified strptime-spelled RFC3339 ABNF looks like
  685|       |         *   "%Y-%m-%d" "T" "%H" ":" "%M" ":" "%S" [".%N"] ("Z" / (("+" / "-") "%H:%M"))
  686|       |         * We additionally allow no seconds and inherited timezone
  687|       |         * for symmetry with our other syntaxes and improved interactive usability:
  688|       |         *   "%Y-%m-%d" "T" "%H" ":" "%M" ":" ["%S" [".%N"]] ["Z" / (("+" / "-") "%H:%M")]
  689|       |         * RFC3339 defines time-secfrac to as "." 1*DIGIT, but we limit to 6 digits,
  690|       |         * since we're limited to 1µs resolution.
  691|       |         * We also accept "Sat 2012-09-22T16:34:22", RFC3339 warns against it.
  692|       |         */
  693|       |
  694|  1.95k|        assert(t);
  ------------------
  |  |   72|  1.95k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.95k|        do {                                                            \
  |  |  |  |   59|  1.95k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.95k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.95k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.95k|                        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|  1.95k|        } while (false)
  |  |  ------------------
  ------------------
  695|       |
  696|  1.95k|        if (max_len != SIZE_MAX) {
  ------------------
  |  Branch (696:13): [True: 217, False: 1.73k]
  ------------------
  697|       |                /* If the input string contains timezone, then cut it here. */
  698|       |
  699|    217|                if (max_len == 0) /* Can't be the only field */
  ------------------
  |  Branch (699:21): [True: 2, False: 215]
  ------------------
  700|      2|                        return -EINVAL;
  701|       |
  702|    215|                t_alloc = strndup(t, max_len);
  703|    215|                if (!t_alloc)
  ------------------
  |  Branch (703:21): [True: 0, False: 215]
  ------------------
  704|      0|                        return -ENOMEM;
  705|       |
  706|    215|                t = t_alloc;
  707|    215|                with_tz = true;
  708|    215|        }
  709|       |
  710|  1.95k|        if (utc) {
  ------------------
  |  Branch (710:13): [True: 215, False: 1.73k]
  ------------------
  711|       |                /* glibc accepts gmtoff more than 24 hours, but we refuse it. */
  712|    215|                if ((usec_t) labs(gmtoff) * USEC_PER_SEC > USEC_PER_DAY)
  ------------------
  |  |   39|    215|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  ------------------
                              if ((usec_t) labs(gmtoff) * USEC_PER_SEC > USEC_PER_DAY)
  ------------------
  |  |   49|    215|#define USEC_PER_DAY ((usec_t) (24ULL*USEC_PER_HOUR))
  |  |  ------------------
  |  |  |  |   47|    215|#define USEC_PER_HOUR ((usec_t) (60ULL*USEC_PER_MINUTE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|    215|#define USEC_PER_MINUTE ((usec_t) (60ULL*USEC_PER_SEC))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   39|    215|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (712:21): [True: 14, False: 201]
  ------------------
  713|     14|                        return -EINVAL;
  714|  1.73k|        } else {
  715|  1.73k|                if (gmtoff != 0)
  ------------------
  |  Branch (715:21): [True: 0, False: 1.73k]
  ------------------
  716|      0|                        return -EINVAL;
  717|  1.73k|        }
  718|       |
  719|  1.93k|        if (t[0] == '@' && !with_tz)
  ------------------
  |  Branch (719:13): [True: 13, False: 1.92k]
  |  Branch (719:28): [True: 7, False: 6]
  ------------------
  720|      7|                return parse_sec(t + 1, ret);
  721|       |
  722|  1.93k|        usec = now(CLOCK_REALTIME);
  723|       |
  724|  1.93k|        if (!with_tz) {
  ------------------
  |  Branch (724:13): [True: 1.73k, False: 201]
  ------------------
  725|  1.73k|                if (streq(t, "now"))
  ------------------
  |  |   46|  1.73k|#define streq(a,b) (strcmp((a),(b)) == 0)
  |  |  ------------------
  |  |  |  Branch (46:20): [True: 1, False: 1.72k]
  |  |  ------------------
  ------------------
  726|      1|                        goto finish;
  727|       |
  728|  1.72k|                if (t[0] == '+') {
  ------------------
  |  Branch (728:21): [True: 102, False: 1.62k]
  ------------------
  729|    102|                        r = parse_sec(t+1, &plus);
  730|    102|                        if (r < 0)
  ------------------
  |  Branch (730:29): [True: 11, False: 91]
  ------------------
  731|     11|                                return r;
  732|       |
  733|     91|                        goto finish;
  734|    102|                }
  735|       |
  736|  1.62k|                if (t[0] == '-') {
  ------------------
  |  Branch (736:21): [True: 71, False: 1.55k]
  ------------------
  737|     71|                        r = parse_sec(t+1, &minus);
  738|     71|                        if (r < 0)
  ------------------
  |  Branch (738:29): [True: 40, False: 31]
  ------------------
  739|     40|                                return r;
  740|       |
  741|     31|                        goto finish;
  742|     71|                }
  743|       |
  744|  1.55k|                if ((k = endswith(t, " ago"))) {
  ------------------
  |  Branch (744:21): [True: 4, False: 1.55k]
  ------------------
  745|      4|                        _cleanup_free_ char *buf = NULL;
  ------------------
  |  |   82|      4|#define _cleanup_free_ _cleanup_(freep)
  |  |  ------------------
  |  |  |  |   78|      4|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
  746|       |
  747|      4|                        buf = strndup(t, k - t);
  748|      4|                        if (!buf)
  ------------------
  |  Branch (748:29): [True: 0, False: 4]
  ------------------
  749|      0|                                return -ENOMEM;
  750|       |
  751|      4|                        r = parse_sec(buf, &minus);
  752|      4|                        if (r < 0)
  ------------------
  |  Branch (752:29): [True: 3, False: 1]
  ------------------
  753|      3|                                return r;
  754|       |
  755|      1|                        goto finish;
  756|      4|                }
  757|       |
  758|  1.55k|                if ((k = endswith(t, " left"))) {
  ------------------
  |  Branch (758:21): [True: 4, False: 1.54k]
  ------------------
  759|      4|                        _cleanup_free_ char *buf = NULL;
  ------------------
  |  |   82|      4|#define _cleanup_free_ _cleanup_(freep)
  |  |  ------------------
  |  |  |  |   78|      4|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
  760|       |
  761|      4|                        buf = strndup(t, k - t);
  762|      4|                        if (!buf)
  ------------------
  |  Branch (762:29): [True: 0, False: 4]
  ------------------
  763|      0|                                return -ENOMEM;
  764|       |
  765|      4|                        r = parse_sec(buf, &plus);
  766|      4|                        if (r < 0)
  ------------------
  |  Branch (766:29): [True: 3, False: 1]
  ------------------
  767|      3|                                return r;
  768|       |
  769|      1|                        goto finish;
  770|      4|                }
  771|  1.55k|        }
  772|       |
  773|  1.74k|        r = localtime_or_gmtime_usec(usec, utc, &tm);
  774|  1.74k|        if (r < 0)
  ------------------
  |  Branch (774:13): [True: 0, False: 1.74k]
  ------------------
  775|      0|                return r;
  776|       |
  777|  1.74k|        tm.tm_isdst = isdst;
  778|       |
  779|  1.74k|        if (streq(t, "today")) {
  ------------------
  |  |   46|  1.74k|#define streq(a,b) (strcmp((a),(b)) == 0)
  |  |  ------------------
  |  |  |  Branch (46:20): [True: 1, False: 1.74k]
  |  |  ------------------
  ------------------
  780|      1|                tm.tm_sec = tm.tm_min = tm.tm_hour = 0;
  781|      1|                goto from_tm;
  782|       |
  783|  1.74k|        } else if (streq(t, "yesterday")) {
  ------------------
  |  |   46|  1.74k|#define streq(a,b) (strcmp((a),(b)) == 0)
  |  |  ------------------
  |  |  |  Branch (46:20): [True: 1, False: 1.74k]
  |  |  ------------------
  ------------------
  784|      1|                tm.tm_mday--;
  785|      1|                tm.tm_sec = tm.tm_min = tm.tm_hour = 0;
  786|      1|                goto from_tm;
  787|       |
  788|  1.74k|        } else if (streq(t, "tomorrow")) {
  ------------------
  |  |   46|  1.74k|#define streq(a,b) (strcmp((a),(b)) == 0)
  |  |  ------------------
  |  |  |  Branch (46:20): [True: 1, False: 1.74k]
  |  |  ------------------
  ------------------
  789|      1|                tm.tm_mday++;
  790|      1|                tm.tm_sec = tm.tm_min = tm.tm_hour = 0;
  791|      1|                goto from_tm;
  792|      1|        }
  793|       |
  794|  24.3k|        FOREACH_ELEMENT(day, day_nr) {
  ------------------
  |  |  466|  1.74k|        FOREACH_ARRAY(i, array, ELEMENTSOF(array))
  |  |  ------------------
  |  |  |  |  463|  1.74k|        _FOREACH_ARRAY(i, array, num, UNIQ_T(m, UNIQ), UNIQ_T(end, UNIQ))
  |  |  |  |  ------------------
  |  |  |  |  |  |  457|  1.74k|        for (typeof(array[0]) *i = (array), *end = ({                   \
  |  |  |  |  |  |  458|  1.74k|                                typeof(num) m = (num);                  \
  |  |  |  |  |  |  459|  1.74k|                                (i && m > 0) ? i + m : NULL;            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (459:34): [True: 1.74k, False: 0]
  |  |  |  |  |  |  |  Branch (459:39): [True: 1.74k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  460|  26.0k|                        }); end && i < end; i++)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (460:29): [True: 26.0k, False: 0]
  |  |  |  |  |  |  |  Branch (460:36): [True: 24.3k, False: 1.73k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  795|  24.3k|                k = startswith_no_case(t, day->name);
  796|  24.3k|                if (!k || *k != ' ')
  ------------------
  |  Branch (796:21): [True: 24.2k, False: 100]
  |  Branch (796:27): [True: 87, False: 13]
  ------------------
  797|  24.3k|                        continue;
  798|       |
  799|     13|                weekday = day->nr;
  800|     13|                t = k + 1;
  801|     13|                break;
  802|  24.3k|        }
  803|       |
  804|  1.74k|        copy = tm;
  805|  1.74k|        k = strptime(t, "%y-%m-%d %H:%M:%S", &tm);
  806|  1.74k|        if (k) {
  ------------------
  |  Branch (806:13): [True: 71, False: 1.67k]
  ------------------
  807|     71|                if (*k == '.')
  ------------------
  |  Branch (807:21): [True: 36, False: 35]
  ------------------
  808|     36|                        goto parse_usec;
  809|     35|                else if (*k == 0)
  ------------------
  |  Branch (809:26): [True: 17, False: 18]
  ------------------
  810|     17|                        goto from_tm;
  811|     71|        }
  812|       |
  813|       |        /* Our "canonical" RFC3339 syntax variant */
  814|  1.69k|        tm = copy;
  815|  1.69k|        k = strptime(t, "%Y-%m-%d %H:%M:%S", &tm);
  816|  1.69k|        if (k) {
  ------------------
  |  Branch (816:13): [True: 78, False: 1.61k]
  ------------------
  817|     78|                if (*k == '.')
  ------------------
  |  Branch (817:21): [True: 37, False: 41]
  ------------------
  818|     37|                        goto parse_usec;
  819|     41|                else if (*k == 0)
  ------------------
  |  Branch (819:26): [True: 23, False: 18]
  ------------------
  820|     23|                        goto from_tm;
  821|     78|        }
  822|       |
  823|       |        /* RFC3339 syntax */
  824|  1.63k|        tm = copy;
  825|  1.63k|        k = strptime(t, "%Y-%m-%dT%H:%M:%S", &tm);
  826|  1.63k|        if (k) {
  ------------------
  |  Branch (826:13): [True: 16, False: 1.61k]
  ------------------
  827|     16|                if (*k == '.')
  ------------------
  |  Branch (827:21): [True: 3, False: 13]
  ------------------
  828|      3|                        goto parse_usec;
  829|     13|                else if (*k == 0)
  ------------------
  |  Branch (829:26): [True: 2, False: 11]
  ------------------
  830|      2|                        goto from_tm;
  831|     16|        }
  832|       |
  833|       |        /* Support OUTPUT_SHORT and OUTPUT_SHORT_PRECISE formats */
  834|  1.62k|        tm = copy;
  835|  1.62k|        k = strptime(t, "%b %d %H:%M:%S", &tm);
  836|  1.62k|        if (k) {
  ------------------
  |  Branch (836:13): [True: 15, False: 1.61k]
  ------------------
  837|     15|                if (*k == '.')
  ------------------
  |  Branch (837:21): [True: 3, False: 12]
  ------------------
  838|      3|                        goto parse_usec;
  839|     12|                else if (*k == 0)
  ------------------
  |  Branch (839:26): [True: 1, False: 11]
  ------------------
  840|      1|                        goto from_tm;
  841|     15|        }
  842|       |
  843|  1.62k|        tm = copy;
  844|  1.62k|        k = strptime(t, "%y-%m-%d %H:%M", &tm);
  845|  1.62k|        if (k && *k == 0) {
  ------------------
  |  Branch (845:13): [True: 65, False: 1.55k]
  |  Branch (845:18): [True: 37, False: 28]
  ------------------
  846|     37|                tm.tm_sec = 0;
  847|     37|                goto from_tm;
  848|     37|        }
  849|       |
  850|       |        /* Our "canonical" RFC3339 syntax variant without seconds */
  851|  1.58k|        tm = copy;
  852|  1.58k|        k = strptime(t, "%Y-%m-%d %H:%M", &tm);
  853|  1.58k|        if (k && *k == 0) {
  ------------------
  |  Branch (853:13): [True: 55, False: 1.53k]
  |  Branch (853:18): [True: 27, False: 28]
  ------------------
  854|     27|                tm.tm_sec = 0;
  855|     27|                goto from_tm;
  856|     27|        }
  857|       |
  858|       |        /* RFC3339 syntax without seconds */
  859|  1.56k|        tm = copy;
  860|  1.56k|        k = strptime(t, "%Y-%m-%dT%H:%M", &tm);
  861|  1.56k|        if (k && *k == 0) {
  ------------------
  |  Branch (861:13): [True: 27, False: 1.53k]
  |  Branch (861:18): [True: 2, False: 25]
  ------------------
  862|      2|                tm.tm_sec = 0;
  863|      2|                goto from_tm;
  864|      2|        }
  865|       |
  866|  1.55k|        tm = copy;
  867|  1.55k|        k = strptime(t, "%y-%m-%d", &tm);
  868|  1.55k|        if (k && *k == 0) {
  ------------------
  |  Branch (868:13): [True: 147, False: 1.41k]
  |  Branch (868:18): [True: 82, False: 65]
  ------------------
  869|     82|                tm.tm_sec = tm.tm_min = tm.tm_hour = 0;
  870|     82|                goto from_tm;
  871|     82|        }
  872|       |
  873|  1.47k|        tm = copy;
  874|  1.47k|        k = strptime(t, "%Y-%m-%d", &tm);
  875|  1.47k|        if (k && *k == 0) {
  ------------------
  |  Branch (875:13): [True: 139, False: 1.33k]
  |  Branch (875:18): [True: 73, False: 66]
  ------------------
  876|     73|                tm.tm_sec = tm.tm_min = tm.tm_hour = 0;
  877|     73|                goto from_tm;
  878|     73|        }
  879|       |
  880|  1.40k|        tm = copy;
  881|  1.40k|        k = strptime(t, "%H:%M:%S", &tm);
  882|  1.40k|        if (k) {
  ------------------
  |  Branch (882:13): [True: 79, False: 1.32k]
  ------------------
  883|     79|                if (*k == '.')
  ------------------
  |  Branch (883:21): [True: 57, False: 22]
  ------------------
  884|     57|                        goto parse_usec;
  885|     22|                else if (*k == 0)
  ------------------
  |  Branch (885:26): [True: 7, False: 15]
  ------------------
  886|      7|                        goto from_tm;
  887|     79|        }
  888|       |
  889|  1.33k|        tm = copy;
  890|  1.33k|        k = strptime(t, "%H:%M", &tm);
  891|  1.33k|        if (k && *k == 0) {
  ------------------
  |  Branch (891:13): [True: 74, False: 1.26k]
  |  Branch (891:18): [True: 46, False: 28]
  ------------------
  892|     46|                tm.tm_sec = 0;
  893|     46|                goto from_tm;
  894|     46|        }
  895|       |
  896|  1.29k|        return -EINVAL;
  897|       |
  898|    136|parse_usec:
  899|    136|        k++;
  900|    136|        r = parse_fractional_part_u(&k, 6, &fractional);
  901|    136|        if (r < 0)
  ------------------
  |  Branch (901:13): [True: 28, False: 108]
  ------------------
  902|     28|                return -EINVAL;
  903|    108|        if (*k != '\0')
  ------------------
  |  Branch (903:13): [True: 28, False: 80]
  ------------------
  904|     28|                return -EINVAL;
  905|       |
  906|    400|from_tm:
  907|    400|        assert(plus == 0);
  ------------------
  |  |   72|    400|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|    400|        do {                                                            \
  |  |  |  |   59|    400|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|    400|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 400]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|    400|                        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|    400|        } while (false)
  |  |  ------------------
  ------------------
  908|    400|        assert(minus == 0);
  ------------------
  |  |   72|    400|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|    400|        do {                                                            \
  |  |  |  |   59|    400|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|    400|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 400]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|    400|                        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|    400|        } while (false)
  |  |  ------------------
  ------------------
  909|       |
  910|    400|        if (weekday >= 0 && tm.tm_wday != weekday)
  ------------------
  |  Branch (910:13): [True: 5, False: 395]
  |  Branch (910:29): [True: 3, False: 2]
  ------------------
  911|      3|                return -EINVAL;
  912|       |
  913|    397|        if (gmtoff < 0) {
  ------------------
  |  Branch (913:13): [True: 61, False: 336]
  ------------------
  914|     61|                plus = -gmtoff * USEC_PER_SEC;
  ------------------
  |  |   39|     61|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  ------------------
  915|       |
  916|       |                /* If gmtoff is negative, the string may be too old to be parsed as UTC.
  917|       |                 * E.g. 1969-12-31 23:00:00 -06 == 1970-01-01 05:00:00 UTC
  918|       |                 * We assumed that gmtoff is in the range of -24:00…+24:00, hence the only date we need to
  919|       |                 * handle here is 1969-12-31. So, let's shift the date with one day, then subtract the shift
  920|       |                 * later. */
  921|     61|                if (tm.tm_year == 69 && tm.tm_mon == 11 && tm.tm_mday == 31) {
  ------------------
  |  Branch (921:21): [True: 14, False: 47]
  |  Branch (921:41): [True: 9, False: 5]
  |  Branch (921:60): [True: 1, False: 8]
  ------------------
  922|       |                        /* Thu 1970-01-01-00:00:00 */
  923|      1|                        tm.tm_year = 70;
  924|      1|                        tm.tm_mon = 0;
  925|      1|                        tm.tm_mday = 1;
  926|      1|                        tm.tm_wday = 4;
  927|      1|                        tm.tm_yday = 0;
  928|      1|                        minus = USEC_PER_DAY;
  ------------------
  |  |   49|      1|#define USEC_PER_DAY ((usec_t) (24ULL*USEC_PER_HOUR))
  |  |  ------------------
  |  |  |  |   47|      1|#define USEC_PER_HOUR ((usec_t) (60ULL*USEC_PER_MINUTE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      1|#define USEC_PER_MINUTE ((usec_t) (60ULL*USEC_PER_SEC))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   39|      1|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  929|      1|                }
  930|     61|        } else
  931|    336|                minus = gmtoff * USEC_PER_SEC;
  ------------------
  |  |   39|    336|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  ------------------
  932|       |
  933|    397|        r = mktime_or_timegm_usec(&tm, utc, &usec);
  934|    397|        if (r < 0)
  ------------------
  |  Branch (934:13): [True: 103, False: 294]
  ------------------
  935|    103|                return r;
  936|       |
  937|    294|        usec = usec_add(usec, fractional);
  938|       |
  939|    419|finish:
  940|    419|        usec = usec_add(usec, plus);
  941|       |
  942|    419|        if (usec < minus)
  ------------------
  |  Branch (942:13): [True: 3, False: 416]
  ------------------
  943|      3|                return -EINVAL;
  944|       |
  945|    416|        usec = usec_sub_unsigned(usec, minus);
  946|       |
  947|    416|        if (usec > USEC_TIMESTAMP_FORMATTABLE_MAX)
  ------------------
  |  |  229|    416|#  define USEC_TIMESTAMP_FORMATTABLE_MAX USEC_TIMESTAMP_FORMATTABLE_MAX_64BIT
  |  |  ------------------
  |  |  |  |  223|    416|#define USEC_TIMESTAMP_FORMATTABLE_MAX_64BIT ((usec_t) 253402214399000000) /* Thu 9999-12-30 23:59:59 UTC */
  |  |  ------------------
  ------------------
  |  Branch (947:13): [True: 57, False: 359]
  ------------------
  948|     57|                return -EINVAL;
  949|       |
  950|    359|        if (ret)
  ------------------
  |  Branch (950:13): [True: 359, False: 0]
  ------------------
  951|    359|                *ret = usec;
  952|    359|        return 0;
  953|    416|}
time-util.c:parse_timestamp_maybe_with_tz:
  955|    166|static int parse_timestamp_maybe_with_tz(const char *t, size_t tz_offset, bool valid_tz, usec_t *ret) {
  956|    166|        assert(t);
  ------------------
  |  |   72|    166|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|    166|        do {                                                            \
  |  |  |  |   59|    166|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|    166|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 166]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|    166|                        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|    166|        } while (false)
  |  |  ------------------
  ------------------
  957|       |
  958|    166|        tzset();
  959|       |
  960|    498|        for (int j = 0; j <= 1; j++) {
  ------------------
  |  Branch (960:25): [True: 332, False: 166]
  ------------------
  961|    332|                if (isempty(tzname[j]))
  ------------------
  |  Branch (961:21): [True: 0, False: 332]
  ------------------
  962|      0|                        continue;
  963|       |
  964|    332|                if (!streq(t + tz_offset, tzname[j]))
  ------------------
  |  |   46|    332|#define streq(a,b) (strcmp((a),(b)) == 0)
  ------------------
  |  Branch (964:21): [True: 332, False: 0]
  ------------------
  965|    332|                        continue;
  966|       |
  967|       |                /* The specified timezone matches tzname[] of the local timezone. */
  968|      0|                return parse_timestamp_impl(t, tz_offset - 1, /* utc = */ false, /* isdst = */ j, /* gmtoff = */ 0, ret);
  969|    332|        }
  970|       |
  971|       |        /* If we know that the last word is a valid timezone (e.g. Asia/Tokyo), then simply drop the timezone
  972|       |         * and parse the remaining string as a local time. If we know that the last word is not a timezone,
  973|       |         * then assume that it is a part of the time and try to parse the whole string as a local time. */
  974|    166|        return parse_timestamp_impl(t, valid_tz ? tz_offset - 1 : SIZE_MAX,
  ------------------
  |  Branch (974:40): [True: 0, False: 166]
  ------------------
  975|       |                                    /* utc = */ false, /* isdst = */ -1, /* gmtoff = */ 0, ret);
  976|    166|}
time-util.c:extract_multiplier:
 1081|  22.3k|static const char* extract_multiplier(const char *p, usec_t *ret) {
 1082|  22.3k|        static const struct {
 1083|  22.3k|                const char *suffix;
 1084|  22.3k|                usec_t usec;
 1085|  22.3k|        } table[] = {
 1086|  22.3k|                { "seconds", USEC_PER_SEC    },
  ------------------
  |  |   39|  22.3k|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  ------------------
 1087|  22.3k|                { "second",  USEC_PER_SEC    },
  ------------------
  |  |   39|  22.3k|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  ------------------
 1088|  22.3k|                { "sec",     USEC_PER_SEC    },
  ------------------
  |  |   39|  22.3k|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  ------------------
 1089|  22.3k|                { "s",       USEC_PER_SEC    },
  ------------------
  |  |   39|  22.3k|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  ------------------
 1090|  22.3k|                { "minutes", USEC_PER_MINUTE },
  ------------------
  |  |   45|  22.3k|#define USEC_PER_MINUTE ((usec_t) (60ULL*USEC_PER_SEC))
  |  |  ------------------
  |  |  |  |   39|  22.3k|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  |  |  ------------------
  ------------------
 1091|  22.3k|                { "minute",  USEC_PER_MINUTE },
  ------------------
  |  |   45|  22.3k|#define USEC_PER_MINUTE ((usec_t) (60ULL*USEC_PER_SEC))
  |  |  ------------------
  |  |  |  |   39|  22.3k|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  |  |  ------------------
  ------------------
 1092|  22.3k|                { "min",     USEC_PER_MINUTE },
  ------------------
  |  |   45|  22.3k|#define USEC_PER_MINUTE ((usec_t) (60ULL*USEC_PER_SEC))
  |  |  ------------------
  |  |  |  |   39|  22.3k|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  |  |  ------------------
  ------------------
 1093|  22.3k|                { "months",  USEC_PER_MONTH  },
  ------------------
  |  |   53|  22.3k|#define USEC_PER_MONTH ((usec_t) (2629800ULL*USEC_PER_SEC))
  |  |  ------------------
  |  |  |  |   39|  22.3k|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  |  |  ------------------
  ------------------
 1094|  22.3k|                { "month",   USEC_PER_MONTH  },
  ------------------
  |  |   53|  22.3k|#define USEC_PER_MONTH ((usec_t) (2629800ULL*USEC_PER_SEC))
  |  |  ------------------
  |  |  |  |   39|  22.3k|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  |  |  ------------------
  ------------------
 1095|  22.3k|                { "M",       USEC_PER_MONTH  },
  ------------------
  |  |   53|  22.3k|#define USEC_PER_MONTH ((usec_t) (2629800ULL*USEC_PER_SEC))
  |  |  ------------------
  |  |  |  |   39|  22.3k|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  |  |  ------------------
  ------------------
 1096|  22.3k|                { "msec",    USEC_PER_MSEC   },
  ------------------
  |  |   40|  22.3k|#define USEC_PER_MSEC ((usec_t) 1000ULL)
  ------------------
 1097|  22.3k|                { "ms",      USEC_PER_MSEC   },
  ------------------
  |  |   40|  22.3k|#define USEC_PER_MSEC ((usec_t) 1000ULL)
  ------------------
 1098|  22.3k|                { "m",       USEC_PER_MINUTE },
  ------------------
  |  |   45|  22.3k|#define USEC_PER_MINUTE ((usec_t) (60ULL*USEC_PER_SEC))
  |  |  ------------------
  |  |  |  |   39|  22.3k|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  |  |  ------------------
  ------------------
 1099|  22.3k|                { "hours",   USEC_PER_HOUR   },
  ------------------
  |  |   47|  22.3k|#define USEC_PER_HOUR ((usec_t) (60ULL*USEC_PER_MINUTE))
  |  |  ------------------
  |  |  |  |   45|  22.3k|#define USEC_PER_MINUTE ((usec_t) (60ULL*USEC_PER_SEC))
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  22.3k|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1100|  22.3k|                { "hour",    USEC_PER_HOUR   },
  ------------------
  |  |   47|  22.3k|#define USEC_PER_HOUR ((usec_t) (60ULL*USEC_PER_MINUTE))
  |  |  ------------------
  |  |  |  |   45|  22.3k|#define USEC_PER_MINUTE ((usec_t) (60ULL*USEC_PER_SEC))
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  22.3k|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1101|  22.3k|                { "hr",      USEC_PER_HOUR   },
  ------------------
  |  |   47|  22.3k|#define USEC_PER_HOUR ((usec_t) (60ULL*USEC_PER_MINUTE))
  |  |  ------------------
  |  |  |  |   45|  22.3k|#define USEC_PER_MINUTE ((usec_t) (60ULL*USEC_PER_SEC))
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  22.3k|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1102|  22.3k|                { "h",       USEC_PER_HOUR   },
  ------------------
  |  |   47|  22.3k|#define USEC_PER_HOUR ((usec_t) (60ULL*USEC_PER_MINUTE))
  |  |  ------------------
  |  |  |  |   45|  22.3k|#define USEC_PER_MINUTE ((usec_t) (60ULL*USEC_PER_SEC))
  |  |  |  |  ------------------
  |  |  |  |  |  |   39|  22.3k|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1103|  22.3k|                { "days",    USEC_PER_DAY    },
  ------------------
  |  |   49|  22.3k|#define USEC_PER_DAY ((usec_t) (24ULL*USEC_PER_HOUR))
  |  |  ------------------
  |  |  |  |   47|  22.3k|#define USEC_PER_HOUR ((usec_t) (60ULL*USEC_PER_MINUTE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  22.3k|#define USEC_PER_MINUTE ((usec_t) (60ULL*USEC_PER_SEC))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   39|  22.3k|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1104|  22.3k|                { "day",     USEC_PER_DAY    },
  ------------------
  |  |   49|  22.3k|#define USEC_PER_DAY ((usec_t) (24ULL*USEC_PER_HOUR))
  |  |  ------------------
  |  |  |  |   47|  22.3k|#define USEC_PER_HOUR ((usec_t) (60ULL*USEC_PER_MINUTE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  22.3k|#define USEC_PER_MINUTE ((usec_t) (60ULL*USEC_PER_SEC))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   39|  22.3k|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1105|  22.3k|                { "d",       USEC_PER_DAY    },
  ------------------
  |  |   49|  22.3k|#define USEC_PER_DAY ((usec_t) (24ULL*USEC_PER_HOUR))
  |  |  ------------------
  |  |  |  |   47|  22.3k|#define USEC_PER_HOUR ((usec_t) (60ULL*USEC_PER_MINUTE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  22.3k|#define USEC_PER_MINUTE ((usec_t) (60ULL*USEC_PER_SEC))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   39|  22.3k|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1106|  22.3k|                { "weeks",   USEC_PER_WEEK   },
  ------------------
  |  |   51|  22.3k|#define USEC_PER_WEEK ((usec_t) (7ULL*USEC_PER_DAY))
  |  |  ------------------
  |  |  |  |   49|  22.3k|#define USEC_PER_DAY ((usec_t) (24ULL*USEC_PER_HOUR))
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|  22.3k|#define USEC_PER_HOUR ((usec_t) (60ULL*USEC_PER_MINUTE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   45|  22.3k|#define USEC_PER_MINUTE ((usec_t) (60ULL*USEC_PER_SEC))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   39|  22.3k|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1107|  22.3k|                { "week",    USEC_PER_WEEK   },
  ------------------
  |  |   51|  22.3k|#define USEC_PER_WEEK ((usec_t) (7ULL*USEC_PER_DAY))
  |  |  ------------------
  |  |  |  |   49|  22.3k|#define USEC_PER_DAY ((usec_t) (24ULL*USEC_PER_HOUR))
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|  22.3k|#define USEC_PER_HOUR ((usec_t) (60ULL*USEC_PER_MINUTE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   45|  22.3k|#define USEC_PER_MINUTE ((usec_t) (60ULL*USEC_PER_SEC))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   39|  22.3k|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1108|  22.3k|                { "w",       USEC_PER_WEEK   },
  ------------------
  |  |   51|  22.3k|#define USEC_PER_WEEK ((usec_t) (7ULL*USEC_PER_DAY))
  |  |  ------------------
  |  |  |  |   49|  22.3k|#define USEC_PER_DAY ((usec_t) (24ULL*USEC_PER_HOUR))
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|  22.3k|#define USEC_PER_HOUR ((usec_t) (60ULL*USEC_PER_MINUTE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   45|  22.3k|#define USEC_PER_MINUTE ((usec_t) (60ULL*USEC_PER_SEC))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   39|  22.3k|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1109|  22.3k|                { "years",   USEC_PER_YEAR   },
  ------------------
  |  |   55|  22.3k|#define USEC_PER_YEAR ((usec_t) (31557600ULL*USEC_PER_SEC))
  |  |  ------------------
  |  |  |  |   39|  22.3k|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  |  |  ------------------
  ------------------
 1110|  22.3k|                { "year",    USEC_PER_YEAR   },
  ------------------
  |  |   55|  22.3k|#define USEC_PER_YEAR ((usec_t) (31557600ULL*USEC_PER_SEC))
  |  |  ------------------
  |  |  |  |   39|  22.3k|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  |  |  ------------------
  ------------------
 1111|  22.3k|                { "y",       USEC_PER_YEAR   },
  ------------------
  |  |   55|  22.3k|#define USEC_PER_YEAR ((usec_t) (31557600ULL*USEC_PER_SEC))
  |  |  ------------------
  |  |  |  |   39|  22.3k|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  |  |  ------------------
  ------------------
 1112|  22.3k|                { "usec",    1ULL            },
 1113|  22.3k|                { "us",      1ULL            },
 1114|  22.3k|                { "μs",      1ULL            }, /* U+03bc (aka GREEK SMALL LETTER MU) */
 1115|  22.3k|                { "µs",      1ULL            }, /* U+b5 (aka MICRO SIGN) */
 1116|  22.3k|        };
 1117|       |
 1118|  22.3k|        assert(p);
  ------------------
  |  |   72|  22.3k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  22.3k|        do {                                                            \
  |  |  |  |   59|  22.3k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  22.3k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 22.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  22.3k|                        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|  22.3k|        } while (false)
  |  |  ------------------
  ------------------
 1119|  22.3k|        assert(ret);
  ------------------
  |  |   72|  22.3k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  22.3k|        do {                                                            \
  |  |  |  |   59|  22.3k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  22.3k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 22.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  22.3k|                        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|  22.3k|        } while (false)
  |  |  ------------------
  ------------------
 1120|       |
 1121|   582k|        FOREACH_ELEMENT(i, table) {
  ------------------
  |  |  466|  22.3k|        FOREACH_ARRAY(i, array, ELEMENTSOF(array))
  |  |  ------------------
  |  |  |  |  463|  22.3k|        _FOREACH_ARRAY(i, array, num, UNIQ_T(m, UNIQ), UNIQ_T(end, UNIQ))
  |  |  |  |  ------------------
  |  |  |  |  |  |  457|  22.3k|        for (typeof(array[0]) *i = (array), *end = ({                   \
  |  |  |  |  |  |  458|  22.3k|                                typeof(num) m = (num);                  \
  |  |  |  |  |  |  459|  22.3k|                                (i && m > 0) ? i + m : NULL;            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (459:34): [True: 22.3k, False: 0]
  |  |  |  |  |  |  |  Branch (459:39): [True: 22.3k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  460|   596k|                        }); end && i < end; i++)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (460:29): [True: 596k, False: 0]
  |  |  |  |  |  |  |  Branch (460:36): [True: 582k, False: 13.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1122|   582k|                char *e;
 1123|       |
 1124|   582k|                e = startswith(p, i->suffix);
 1125|   582k|                if (e) {
  ------------------
  |  Branch (1125:21): [True: 8.46k, False: 574k]
  ------------------
 1126|  8.46k|                        *ret = i->usec;
 1127|  8.46k|                        return e;
 1128|  8.46k|                }
 1129|   582k|        }
 1130|       |
 1131|  13.8k|        return p;
 1132|  22.3k|}
time-util.c:extract_nsec_multiplier:
 1256|  5.46k|static const char* extract_nsec_multiplier(const char *p, nsec_t *ret) {
 1257|  5.46k|        static const struct {
 1258|  5.46k|                const char *suffix;
 1259|  5.46k|                nsec_t nsec;
 1260|  5.46k|        } table[] = {
 1261|  5.46k|                { "seconds", NSEC_PER_SEC    },
  ------------------
  |  |   41|  5.46k|#define NSEC_PER_SEC  ((nsec_t) 1000000000ULL)
  ------------------
 1262|  5.46k|                { "second",  NSEC_PER_SEC    },
  ------------------
  |  |   41|  5.46k|#define NSEC_PER_SEC  ((nsec_t) 1000000000ULL)
  ------------------
 1263|  5.46k|                { "sec",     NSEC_PER_SEC    },
  ------------------
  |  |   41|  5.46k|#define NSEC_PER_SEC  ((nsec_t) 1000000000ULL)
  ------------------
 1264|  5.46k|                { "s",       NSEC_PER_SEC    },
  ------------------
  |  |   41|  5.46k|#define NSEC_PER_SEC  ((nsec_t) 1000000000ULL)
  ------------------
 1265|  5.46k|                { "minutes", NSEC_PER_MINUTE },
  ------------------
  |  |   46|  5.46k|#define NSEC_PER_MINUTE ((nsec_t) (60ULL*NSEC_PER_SEC))
  |  |  ------------------
  |  |  |  |   41|  5.46k|#define NSEC_PER_SEC  ((nsec_t) 1000000000ULL)
  |  |  ------------------
  ------------------
 1266|  5.46k|                { "minute",  NSEC_PER_MINUTE },
  ------------------
  |  |   46|  5.46k|#define NSEC_PER_MINUTE ((nsec_t) (60ULL*NSEC_PER_SEC))
  |  |  ------------------
  |  |  |  |   41|  5.46k|#define NSEC_PER_SEC  ((nsec_t) 1000000000ULL)
  |  |  ------------------
  ------------------
 1267|  5.46k|                { "min",     NSEC_PER_MINUTE },
  ------------------
  |  |   46|  5.46k|#define NSEC_PER_MINUTE ((nsec_t) (60ULL*NSEC_PER_SEC))
  |  |  ------------------
  |  |  |  |   41|  5.46k|#define NSEC_PER_SEC  ((nsec_t) 1000000000ULL)
  |  |  ------------------
  ------------------
 1268|  5.46k|                { "months",  NSEC_PER_MONTH  },
  ------------------
  |  |   54|  5.46k|#define NSEC_PER_MONTH ((nsec_t) (2629800ULL*NSEC_PER_SEC))
  |  |  ------------------
  |  |  |  |   41|  5.46k|#define NSEC_PER_SEC  ((nsec_t) 1000000000ULL)
  |  |  ------------------
  ------------------
 1269|  5.46k|                { "month",   NSEC_PER_MONTH  },
  ------------------
  |  |   54|  5.46k|#define NSEC_PER_MONTH ((nsec_t) (2629800ULL*NSEC_PER_SEC))
  |  |  ------------------
  |  |  |  |   41|  5.46k|#define NSEC_PER_SEC  ((nsec_t) 1000000000ULL)
  |  |  ------------------
  ------------------
 1270|  5.46k|                { "M",       NSEC_PER_MONTH  },
  ------------------
  |  |   54|  5.46k|#define NSEC_PER_MONTH ((nsec_t) (2629800ULL*NSEC_PER_SEC))
  |  |  ------------------
  |  |  |  |   41|  5.46k|#define NSEC_PER_SEC  ((nsec_t) 1000000000ULL)
  |  |  ------------------
  ------------------
 1271|  5.46k|                { "msec",    NSEC_PER_MSEC   },
  ------------------
  |  |   42|  5.46k|#define NSEC_PER_MSEC ((nsec_t) 1000000ULL)
  ------------------
 1272|  5.46k|                { "ms",      NSEC_PER_MSEC   },
  ------------------
  |  |   42|  5.46k|#define NSEC_PER_MSEC ((nsec_t) 1000000ULL)
  ------------------
 1273|  5.46k|                { "m",       NSEC_PER_MINUTE },
  ------------------
  |  |   46|  5.46k|#define NSEC_PER_MINUTE ((nsec_t) (60ULL*NSEC_PER_SEC))
  |  |  ------------------
  |  |  |  |   41|  5.46k|#define NSEC_PER_SEC  ((nsec_t) 1000000000ULL)
  |  |  ------------------
  ------------------
 1274|  5.46k|                { "hours",   NSEC_PER_HOUR   },
  ------------------
  |  |   48|  5.46k|#define NSEC_PER_HOUR ((nsec_t) (60ULL*NSEC_PER_MINUTE))
  |  |  ------------------
  |  |  |  |   46|  5.46k|#define NSEC_PER_MINUTE ((nsec_t) (60ULL*NSEC_PER_SEC))
  |  |  |  |  ------------------
  |  |  |  |  |  |   41|  5.46k|#define NSEC_PER_SEC  ((nsec_t) 1000000000ULL)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1275|  5.46k|                { "hour",    NSEC_PER_HOUR   },
  ------------------
  |  |   48|  5.46k|#define NSEC_PER_HOUR ((nsec_t) (60ULL*NSEC_PER_MINUTE))
  |  |  ------------------
  |  |  |  |   46|  5.46k|#define NSEC_PER_MINUTE ((nsec_t) (60ULL*NSEC_PER_SEC))
  |  |  |  |  ------------------
  |  |  |  |  |  |   41|  5.46k|#define NSEC_PER_SEC  ((nsec_t) 1000000000ULL)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1276|  5.46k|                { "hr",      NSEC_PER_HOUR   },
  ------------------
  |  |   48|  5.46k|#define NSEC_PER_HOUR ((nsec_t) (60ULL*NSEC_PER_MINUTE))
  |  |  ------------------
  |  |  |  |   46|  5.46k|#define NSEC_PER_MINUTE ((nsec_t) (60ULL*NSEC_PER_SEC))
  |  |  |  |  ------------------
  |  |  |  |  |  |   41|  5.46k|#define NSEC_PER_SEC  ((nsec_t) 1000000000ULL)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1277|  5.46k|                { "h",       NSEC_PER_HOUR   },
  ------------------
  |  |   48|  5.46k|#define NSEC_PER_HOUR ((nsec_t) (60ULL*NSEC_PER_MINUTE))
  |  |  ------------------
  |  |  |  |   46|  5.46k|#define NSEC_PER_MINUTE ((nsec_t) (60ULL*NSEC_PER_SEC))
  |  |  |  |  ------------------
  |  |  |  |  |  |   41|  5.46k|#define NSEC_PER_SEC  ((nsec_t) 1000000000ULL)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1278|  5.46k|                { "days",    NSEC_PER_DAY    },
  ------------------
  |  |   50|  5.46k|#define NSEC_PER_DAY ((nsec_t) (24ULL*NSEC_PER_HOUR))
  |  |  ------------------
  |  |  |  |   48|  5.46k|#define NSEC_PER_HOUR ((nsec_t) (60ULL*NSEC_PER_MINUTE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   46|  5.46k|#define NSEC_PER_MINUTE ((nsec_t) (60ULL*NSEC_PER_SEC))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   41|  5.46k|#define NSEC_PER_SEC  ((nsec_t) 1000000000ULL)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1279|  5.46k|                { "day",     NSEC_PER_DAY    },
  ------------------
  |  |   50|  5.46k|#define NSEC_PER_DAY ((nsec_t) (24ULL*NSEC_PER_HOUR))
  |  |  ------------------
  |  |  |  |   48|  5.46k|#define NSEC_PER_HOUR ((nsec_t) (60ULL*NSEC_PER_MINUTE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   46|  5.46k|#define NSEC_PER_MINUTE ((nsec_t) (60ULL*NSEC_PER_SEC))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   41|  5.46k|#define NSEC_PER_SEC  ((nsec_t) 1000000000ULL)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1280|  5.46k|                { "d",       NSEC_PER_DAY    },
  ------------------
  |  |   50|  5.46k|#define NSEC_PER_DAY ((nsec_t) (24ULL*NSEC_PER_HOUR))
  |  |  ------------------
  |  |  |  |   48|  5.46k|#define NSEC_PER_HOUR ((nsec_t) (60ULL*NSEC_PER_MINUTE))
  |  |  |  |  ------------------
  |  |  |  |  |  |   46|  5.46k|#define NSEC_PER_MINUTE ((nsec_t) (60ULL*NSEC_PER_SEC))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   41|  5.46k|#define NSEC_PER_SEC  ((nsec_t) 1000000000ULL)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1281|  5.46k|                { "weeks",   NSEC_PER_WEEK   },
  ------------------
  |  |   52|  5.46k|#define NSEC_PER_WEEK ((nsec_t) (7ULL*NSEC_PER_DAY))
  |  |  ------------------
  |  |  |  |   50|  5.46k|#define NSEC_PER_DAY ((nsec_t) (24ULL*NSEC_PER_HOUR))
  |  |  |  |  ------------------
  |  |  |  |  |  |   48|  5.46k|#define NSEC_PER_HOUR ((nsec_t) (60ULL*NSEC_PER_MINUTE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|  5.46k|#define NSEC_PER_MINUTE ((nsec_t) (60ULL*NSEC_PER_SEC))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   41|  5.46k|#define NSEC_PER_SEC  ((nsec_t) 1000000000ULL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1282|  5.46k|                { "week",    NSEC_PER_WEEK   },
  ------------------
  |  |   52|  5.46k|#define NSEC_PER_WEEK ((nsec_t) (7ULL*NSEC_PER_DAY))
  |  |  ------------------
  |  |  |  |   50|  5.46k|#define NSEC_PER_DAY ((nsec_t) (24ULL*NSEC_PER_HOUR))
  |  |  |  |  ------------------
  |  |  |  |  |  |   48|  5.46k|#define NSEC_PER_HOUR ((nsec_t) (60ULL*NSEC_PER_MINUTE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|  5.46k|#define NSEC_PER_MINUTE ((nsec_t) (60ULL*NSEC_PER_SEC))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   41|  5.46k|#define NSEC_PER_SEC  ((nsec_t) 1000000000ULL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1283|  5.46k|                { "w",       NSEC_PER_WEEK   },
  ------------------
  |  |   52|  5.46k|#define NSEC_PER_WEEK ((nsec_t) (7ULL*NSEC_PER_DAY))
  |  |  ------------------
  |  |  |  |   50|  5.46k|#define NSEC_PER_DAY ((nsec_t) (24ULL*NSEC_PER_HOUR))
  |  |  |  |  ------------------
  |  |  |  |  |  |   48|  5.46k|#define NSEC_PER_HOUR ((nsec_t) (60ULL*NSEC_PER_MINUTE))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|  5.46k|#define NSEC_PER_MINUTE ((nsec_t) (60ULL*NSEC_PER_SEC))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   41|  5.46k|#define NSEC_PER_SEC  ((nsec_t) 1000000000ULL)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1284|  5.46k|                { "years",   NSEC_PER_YEAR   },
  ------------------
  |  |   56|  5.46k|#define NSEC_PER_YEAR ((nsec_t) (31557600ULL*NSEC_PER_SEC))
  |  |  ------------------
  |  |  |  |   41|  5.46k|#define NSEC_PER_SEC  ((nsec_t) 1000000000ULL)
  |  |  ------------------
  ------------------
 1285|  5.46k|                { "year",    NSEC_PER_YEAR   },
  ------------------
  |  |   56|  5.46k|#define NSEC_PER_YEAR ((nsec_t) (31557600ULL*NSEC_PER_SEC))
  |  |  ------------------
  |  |  |  |   41|  5.46k|#define NSEC_PER_SEC  ((nsec_t) 1000000000ULL)
  |  |  ------------------
  ------------------
 1286|  5.46k|                { "y",       NSEC_PER_YEAR   },
  ------------------
  |  |   56|  5.46k|#define NSEC_PER_YEAR ((nsec_t) (31557600ULL*NSEC_PER_SEC))
  |  |  ------------------
  |  |  |  |   41|  5.46k|#define NSEC_PER_SEC  ((nsec_t) 1000000000ULL)
  |  |  ------------------
  ------------------
 1287|  5.46k|                { "usec",    NSEC_PER_USEC   },
  ------------------
  |  |   43|  5.46k|#define NSEC_PER_USEC ((nsec_t) 1000ULL)
  ------------------
 1288|  5.46k|                { "us",      NSEC_PER_USEC   },
  ------------------
  |  |   43|  5.46k|#define NSEC_PER_USEC ((nsec_t) 1000ULL)
  ------------------
 1289|  5.46k|                { "μs",      NSEC_PER_USEC   }, /* U+03bc (aka GREEK LETTER MU) */
  ------------------
  |  |   43|  5.46k|#define NSEC_PER_USEC ((nsec_t) 1000ULL)
  ------------------
 1290|  5.46k|                { "µs",      NSEC_PER_USEC   }, /* U+b5 (aka MICRO SIGN) */
  ------------------
  |  |   43|  5.46k|#define NSEC_PER_USEC ((nsec_t) 1000ULL)
  ------------------
 1291|  5.46k|                { "nsec",    1ULL            },
 1292|  5.46k|                { "ns",      1ULL            },
 1293|  5.46k|                { "",        1ULL            }, /* default is nsec */
 1294|  5.46k|        };
 1295|       |
 1296|  5.46k|        assert(p);
  ------------------
  |  |   72|  5.46k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  5.46k|        do {                                                            \
  |  |  |  |   59|  5.46k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  5.46k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 5.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  5.46k|                        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|  5.46k|        } while (false)
  |  |  ------------------
  ------------------
 1297|  5.46k|        assert(ret);
  ------------------
  |  |   72|  5.46k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  5.46k|        do {                                                            \
  |  |  |  |   59|  5.46k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  5.46k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 5.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  5.46k|                        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|  5.46k|        } while (false)
  |  |  ------------------
  ------------------
 1298|       |
 1299|   152k|        FOREACH_ELEMENT(i, table) {
  ------------------
  |  |  466|  5.46k|        FOREACH_ARRAY(i, array, ELEMENTSOF(array))
  |  |  ------------------
  |  |  |  |  463|  5.46k|        _FOREACH_ARRAY(i, array, num, UNIQ_T(m, UNIQ), UNIQ_T(end, UNIQ))
  |  |  |  |  ------------------
  |  |  |  |  |  |  457|  5.46k|        for (typeof(array[0]) *i = (array), *end = ({                   \
  |  |  |  |  |  |  458|  5.46k|                                typeof(num) m = (num);                  \
  |  |  |  |  |  |  459|  5.46k|                                (i && m > 0) ? i + m : NULL;            \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (459:34): [True: 5.46k, False: 0]
  |  |  |  |  |  |  |  Branch (459:39): [True: 5.46k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  460|   152k|                        }); end && i < end; i++)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (460:29): [True: 152k, False: 0]
  |  |  |  |  |  |  |  Branch (460:36): [True: 152k, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1300|   152k|                char *e;
 1301|       |
 1302|   152k|                e = startswith(p, i->suffix);
 1303|   152k|                if (e) {
  ------------------
  |  Branch (1303:21): [True: 5.46k, False: 147k]
  ------------------
 1304|  5.46k|                        *ret = i->nsec;
 1305|  5.46k|                        return e;
 1306|  5.46k|                }
 1307|   152k|        }
 1308|       |
 1309|      0|        return p;
 1310|  5.46k|}

fuzz-time-util.c:timezone_is_valid:
  162|  1.91k|static inline bool timezone_is_valid(const char *name, int log_level) {
  163|  1.91k|        return verify_timezone(name, log_level) >= 0;
  164|  1.91k|}
time-util.c:timezone_is_valid:
  162|    231|static inline bool timezone_is_valid(const char *name, int log_level) {
  163|    231|        return verify_timezone(name, log_level) >= 0;
  164|    231|}
time-util.c:usec_add:
  180|    713|static inline usec_t usec_add(usec_t a, usec_t b) {
  181|       |        /* Adds two time values, and makes sure USEC_INFINITY as input results as USEC_INFINITY in output,
  182|       |         * and doesn't overflow. */
  183|    713|        return saturate_add(a, b, USEC_INFINITY);
  ------------------
  |  |  175|    713|        ({                                                              \
  |  |  176|    713|                typeof(limit) _x = (x);                                 \
  |  |  177|    713|                typeof(limit) _y = (y);                                 \
  |  |  178|    713|                _x > (limit) || _y >= (limit) - _x ? (limit) : _x + _y; \
  |  |  ------------------
  |  |  |  Branch (178:17): [True: 0, False: 713]
  |  |  |  Branch (178:33): [True: 7, False: 706]
  |  |  ------------------
  |  |  179|    713|        })
  ------------------
  184|    713|}
time-util.c:usec_sub_unsigned:
  186|    416|static inline usec_t usec_sub_unsigned(usec_t timestamp, usec_t delta) {
  187|    416|        if (timestamp == USEC_INFINITY) /* Make sure infinity doesn't degrade */
  ------------------
  |  |   35|    416|#define USEC_INFINITY ((usec_t) UINT64_MAX)
  ------------------
  |  Branch (187:13): [True: 7, False: 409]
  ------------------
  188|      7|                return USEC_INFINITY;
  ------------------
  |  |   35|      7|#define USEC_INFINITY ((usec_t) UINT64_MAX)
  ------------------
  189|    409|        if (timestamp < delta)
  ------------------
  |  Branch (189:13): [True: 0, False: 409]
  ------------------
  190|      0|                return 0;
  191|       |
  192|    409|        return timestamp - delta;
  193|    409|}

startswith:
    6|   745k|sd_char *startswith(const sd_char *s, const sd_char *prefix) {
    7|   745k|        size_t l;
    8|       |
    9|   745k|        assert(s);
  ------------------
  |  |   72|   745k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|   745k|        do {                                                            \
  |  |  |  |   59|   745k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|   745k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 745k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|   745k|                        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|   745k|        } while (false)
  |  |  ------------------
  ------------------
   10|   745k|        assert(prefix);
  ------------------
  |  |   72|   745k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|   745k|        do {                                                            \
  |  |  |  |   59|   745k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|   745k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 745k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|   745k|                        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|   745k|        } while (false)
  |  |  ------------------
  ------------------
   11|       |
   12|   745k|        l = strlen(prefix);
   13|   745k|        if (!strneq(s, prefix, l))
  ------------------
  |  |   47|   745k|#define strneq(a, b, n) (strncmp((a), (b), (n)) == 0)
  ------------------
  |  Branch (13:13): [True: 731k, False: 13.9k]
  ------------------
   14|   731k|                return NULL;
   15|       |
   16|  13.9k|        return (sd_char*) s + l;
   17|   745k|}
startswith_no_case:
   19|  24.3k|sd_char *startswith_no_case(const sd_char *s, const sd_char *prefix) {
   20|  24.3k|        size_t l;
   21|       |
   22|  24.3k|        assert(s);
  ------------------
  |  |   72|  24.3k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  24.3k|        do {                                                            \
  |  |  |  |   59|  24.3k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  24.3k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 24.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  24.3k|                        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|  24.3k|        } while (false)
  |  |  ------------------
  ------------------
   23|  24.3k|        assert(prefix);
  ------------------
  |  |   72|  24.3k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  24.3k|        do {                                                            \
  |  |  |  |   59|  24.3k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  24.3k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 24.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  24.3k|                        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|  24.3k|        } while (false)
  |  |  ------------------
  ------------------
   24|       |
   25|  24.3k|        l = strlen(prefix);
   26|  24.3k|        if (!strncaseeq(s, prefix, l))
  ------------------
  |  |   49|  24.3k|#define strncaseeq(a, b, n) (strncasecmp((a), (b), (n)) == 0)
  ------------------
  |  Branch (26:13): [True: 24.2k, False: 100]
  ------------------
   27|  24.2k|                return NULL;
   28|       |
   29|    100|        return (sd_char*) s + l;
   30|  24.3k|}
endswith:
   32|  3.17k|sd_char* endswith(const sd_char *s, const sd_char *suffix) {
   33|  3.17k|        size_t sl, pl;
   34|       |
   35|  3.17k|        assert(s);
  ------------------
  |  |   72|  3.17k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  3.17k|        do {                                                            \
  |  |  |  |   59|  3.17k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  3.17k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 3.17k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  3.17k|                        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|  3.17k|        } while (false)
  |  |  ------------------
  ------------------
   36|  3.17k|        assert(suffix);
  ------------------
  |  |   72|  3.17k|#define assert(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  3.17k|        do {                                                            \
  |  |  |  |   59|  3.17k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  3.17k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 3.17k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  3.17k|                        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|  3.17k|        } while (false)
  |  |  ------------------
  ------------------
   37|       |
   38|  3.17k|        sl = strlen(s);
   39|  3.17k|        pl = strlen(suffix);
   40|       |
   41|  3.17k|        if (pl == 0)
  ------------------
  |  Branch (41:13): [True: 0, False: 3.17k]
  ------------------
   42|      0|                return (sd_char*) s + sl;
   43|       |
   44|  3.17k|        if (sl < pl)
  ------------------
  |  Branch (44:13): [True: 770, False: 2.40k]
  ------------------
   45|    770|                return NULL;
   46|       |
   47|  2.40k|        if (!streq(s + sl - pl, suffix))
  ------------------
  |  |   46|  2.40k|#define streq(a,b) (strcmp((a),(b)) == 0)
  ------------------
  |  Branch (47:13): [True: 2.33k, False: 73]
  ------------------
   48|  2.33k|                return NULL;
   49|       |
   50|     73|        return (sd_char*) s + sl - pl;
   51|  2.40k|}

parse-util.c:ascii_isdigit:
  123|    455|static inline bool ascii_isdigit(sd_char a) {
  124|       |        /* A pure ASCII, locale independent version of isdigit() */
  125|    455|        return a >= '0' && a <= '9';
  ------------------
  |  Branch (125:16): [True: 362, False: 93]
  |  Branch (125:28): [True: 338, False: 24]
  ------------------
  126|    455|}
stat-util.c:isempty:
   85|    140|static inline bool isempty(const sd_char *a) {
   86|    140|        return !a || a[0] == '\0';
  ------------------
  |  Branch (86:16): [True: 140, False: 0]
  |  Branch (86:22): [True: 0, False: 0]
  ------------------
   87|    140|}
stat-util.c:strempty:
   89|     70|static inline const sd_char *strempty(const sd_char *s) {
   90|     70|        return s ?: STR_C("");
  ------------------
  |  |   42|     70|#  define STR_C(str)       (str)
  ------------------
  |  Branch (90:16): [True: 0, False: 70]
  ------------------
   91|     70|}
time-util.c:isempty:
   85|  4.38k|static inline bool isempty(const sd_char *a) {
   86|  4.38k|        return !a || a[0] == '\0';
  ------------------
  |  Branch (86:16): [True: 0, False: 4.38k]
  |  Branch (86:22): [True: 25, False: 4.35k]
  ------------------
   87|  4.38k|}
time-util.c:ascii_isdigit:
  123|  2.38M|static inline bool ascii_isdigit(sd_char a) {
  124|       |        /* A pure ASCII, locale independent version of isdigit() */
  125|  2.38M|        return a >= '0' && a <= '9';
  ------------------
  |  Branch (125:16): [True: 2.36M, False: 19.5k]
  |  Branch (125:28): [True: 2.19M, False: 173k]
  ------------------
  126|  2.38M|}
time-util.c:ascii_isalpha:
  132|   192k|static inline bool ascii_isalpha(sd_char a) {
  133|       |        /* A pure ASCII, locale independent version of isalpha() */
  134|   192k|        return (a >= 'a' && a <= 'z') || (a >= 'A' && a <= 'Z');
  ------------------
  |  Branch (134:17): [True: 151k, False: 41.2k]
  |  Branch (134:29): [True: 151k, False: 12]
  |  Branch (134:43): [True: 21.2k, False: 19.9k]
  |  Branch (134:55): [True: 19.1k, False: 2.10k]
  ------------------
  135|   192k|}

LLVMFuzzerTestOneInput:
    7|  1.91k|int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
    8|  1.91k|        _cleanup_free_ char *str = NULL;
  ------------------
  |  |   82|  1.91k|#define _cleanup_free_ _cleanup_(freep)
  |  |  ------------------
  |  |  |  |   78|  1.91k|#define _cleanup_(x) __attribute__((__cleanup__(x)))
  |  |  ------------------
  ------------------
    9|  1.91k|        usec_t usec;
   10|       |
   11|  1.91k|        fuzz_setup_logging();
   12|       |
   13|  1.91k|        assert_se(str = memdup_suffix0(data, size));
  ------------------
  |  |   65|  1.91k|#define assert_se(expr) assert_message_se(expr, #expr)
  |  |  ------------------
  |  |  |  |   58|  1.91k|        do {                                                            \
  |  |  |  |   59|  1.91k|                if (_unlikely_(!(expr)))                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   95|  1.91k|#define _unlikely_(x) (__builtin_expect(!!(x), 0))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (95:23): [True: 0, False: 1.91k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   60|  1.91k|                        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|  1.91k|        } while (false)
  |  |  ------------------
  ------------------
   14|       |
   15|  1.91k|        (void) parse_timestamp(str, &usec);
   16|  1.91k|        (void) parse_sec(str, &usec);
   17|  1.91k|        (void) parse_sec_fix_0(str, &usec);
   18|  1.91k|        (void) parse_sec_def_infinity(str, &usec);
   19|  1.91k|        (void) parse_time(str, &usec, USEC_PER_SEC);
  ------------------
  |  |   39|  1.91k|#define USEC_PER_SEC  ((usec_t) 1000000ULL)
  ------------------
   20|  1.91k|        (void) parse_nsec(str, &usec);
   21|       |
   22|  1.91k|        (void) timezone_is_valid(str, LOG_DEBUG);
   23|       |
   24|  1.91k|        return 0;
   25|  1.91k|}

fuzz-time-util.c:fuzz_setup_logging:
   32|  1.91k|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|  1.91k|        log_set_assert_return_is_critical(true);
   36|  1.91k|        log_set_max_level(LOG_CRIT);
   37|  1.91k|        log_setup();
   38|  1.91k|}

