summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/sd-lldp.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-08-03 16:43:29 +0200
committerLennart Poettering <lennart@poettering.net>2015-08-03 17:40:46 +0200
commit27ec691bfd4088b678aa18d0bad90be47d0357f4 (patch)
tree97217597b2c79361ca891d3a23bd880bcf2aa972 /src/libsystemd-network/sd-lldp.c
parent5ef9b2203e027da168b18d92045462422895565b (diff)
tree-wide: convert bootchart and lldp code to use clock_boottime_or_monotonic()
We should avoid using CLOCK_BOOTTIME directly unless we actually can sensible distuingish it from CLOCK_MONOTONIC. CLOCK_BOOTTIME is only fully feature on very recent Linux kernels, hence we should stick to a fallback logic, which is already available in the clock_boottime_or_monotonic() call.
Diffstat (limited to 'src/libsystemd-network/sd-lldp.c')
-rw-r--r--src/libsystemd-network/sd-lldp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsystemd-network/sd-lldp.c b/src/libsystemd-network/sd-lldp.c
index 034163eb9e..574e04b541 100644
--- a/src/libsystemd-network/sd-lldp.c
+++ b/src/libsystemd-network/sd-lldp.c
@@ -392,7 +392,7 @@ static void lldp_mib_delete_objects(sd_lldp *lldp) {
break;
if (t <= 0)
- t = now(CLOCK_BOOTTIME);
+ t = now(clock_boottime_or_monotonic());
if (p->until > t)
break;
@@ -490,7 +490,7 @@ int sd_lldp_save(sd_lldp *lldp, const char *lldp_file) {
free(s);
s = k;
- time = now(CLOCK_BOOTTIME);
+ time = now(clock_boottime_or_monotonic());
/* Don't write expired packets */
if (time - p->until <= 0)