diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-07-04 19:10:11 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-07-04 19:12:47 +0200 |
commit | 1f65fd4926c5b88db770c1b47a0b0a24c2319d12 (patch) | |
tree | 3ff3c0268a5d02aa96fcde241816fcb2bf7b6e02 /src/core/job.c | |
parent | Merge pull request #12946 from poettering/blockdev-tweaks (diff) | |
download | systemd-1f65fd4926c5b88db770c1b47a0b0a24c2319d12.tar.xz systemd-1f65fd4926c5b88db770c1b47a0b0a24c2319d12.zip |
basic/time-util: add helper function to check if timestamp is set
No functional change.
Diffstat (limited to 'src/core/job.c')
-rw-r--r-- | src/core/job.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/job.c b/src/core/job.c index 81f5f9cb72..df7eacfbc0 100644 --- a/src/core/job.c +++ b/src/core/job.c @@ -1347,7 +1347,7 @@ int job_coldplug(Job *j) { if (j->unit->job_timeout != USEC_INFINITY) timeout_time = usec_add(j->begin_usec, j->unit->job_timeout); - if (j->begin_running_usec > 0 && j->unit->job_running_timeout != USEC_INFINITY) + if (timestamp_is_set(j->begin_running_usec)) timeout_time = MIN(timeout_time, usec_add(j->begin_running_usec, j->unit->job_running_timeout)); if (timeout_time == USEC_INFINITY) |