Merge pull request #22600 from poettering/timestamp_is_set-more
make more use of timestamp_is_set()
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user