summaryrefslogtreecommitdiffstats
path: root/src/libsystemd-network/sd-lldp-rx.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2021-09-28 08:38:50 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-09-28 10:55:19 +0200
commit3e4a2025195b85beec4824b7285516b57ad34eab (patch)
treea0b5c90adfa8fed5fcfd2fe0c8bed1f0d9d30dfd /src/libsystemd-network/sd-lldp-rx.c
parentsd-lldp-rx: use _cleanup_ attribute at one more place (diff)
downloadsystemd-3e4a2025195b85beec4824b7285516b57ad34eab.tar.xz
systemd-3e4a2025195b85beec4824b7285516b57ad34eab.zip
sd-lldp-rx: do not enable timer event source in sd_lldp_rx_get_neighbors()
It must be just a simple getter.
Diffstat (limited to 'src/libsystemd-network/sd-lldp-rx.c')
-rw-r--r--src/libsystemd-network/sd-lldp-rx.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/libsystemd-network/sd-lldp-rx.c b/src/libsystemd-network/sd-lldp-rx.c
index bf544a5e3a..af4bd62762 100644
--- a/src/libsystemd-network/sd-lldp-rx.c
+++ b/src/libsystemd-network/sd-lldp-rx.c
@@ -456,7 +456,7 @@ static inline int neighbor_compare_func(sd_lldp_neighbor * const *a, sd_lldp_nei
_public_ int sd_lldp_rx_get_neighbors(sd_lldp_rx *lldp_rx, sd_lldp_neighbor ***ret) {
_cleanup_free_ sd_lldp_neighbor **l = NULL;
sd_lldp_neighbor *n;
- int k = 0, r;
+ int k = 0;
assert_return(lldp_rx, -EINVAL);
assert_return(ret, -EINVAL);
@@ -470,10 +470,6 @@ _public_ int sd_lldp_rx_get_neighbors(sd_lldp_rx *lldp_rx, sd_lldp_neighbor ***r
if (!l)
return -ENOMEM;
- r = lldp_rx_start_timer(lldp_rx, NULL);
- if (r < 0)
- return r;
-
HASHMAP_FOREACH(n, lldp_rx->neighbor_by_id)
l[k++] = sd_lldp_neighbor_ref(n);