Merge pull request #22600 from poettering/timestamp_is_set-more

make more use of timestamp_is_set()
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2022-02-23 08:59:49 +01:00
committed by GitHub
12 changed files with 94 additions and 21 deletions
+1 -1
View File
@@ -334,7 +334,7 @@ void lldp_neighbor_start_ttl(sd_lldp_neighbor *n) {
/* Use the packet's timestamp if there is one known */
base = triple_timestamp_by_clock(&n->timestamp, clock_boottime_or_monotonic());
if (base <= 0 || base == USEC_INFINITY)
if (!timestamp_is_set(base))
base = now(clock_boottime_or_monotonic()); /* Otherwise, take the current time */
n->until = usec_add(base, n->ttl * USEC_PER_SEC);