From 3e4a2025195b85beec4824b7285516b57ad34eab Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Tue, 28 Sep 2021 15:38:50 +0900 Subject: [PATCH] sd-lldp-rx: do not enable timer event source in sd_lldp_rx_get_neighbors() It must be just a simple getter. --- src/libsystemd-network/sd-lldp-rx.c | 6 +----- 1 file changed, 1 insertion(+), 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);