summaryrefslogtreecommitdiffstats
path: root/ldpd
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2018-09-08 19:25:00 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2018-09-08 20:34:32 +0200
commita43ad4fef85196592e59665fa9b69eddb30592e0 (patch)
tree943b674a163f17a9e6a83ab7871dd1845bac9beb /ldpd
parentMerge pull request #2989 from donaldsharp/static_debug (diff)
downloadfrr-a43ad4fef85196592e59665fa9b69eddb30592e0.tar.xz
frr-a43ad4fef85196592e59665fa9b69eddb30592e0.zip
lib, ldpd: fix SA warnings from TAILQ oddness
Add a TAILQ_POP_FIRST so Clang understands it's the same item that is getting removed from the list. Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'ldpd')
-rw-r--r--ldpd/lde.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/ldpd/lde.c b/ldpd/lde.c
index 03b62b482..810439888 100644
--- a/ldpd/lde.c
+++ b/ldpd/lde.c
@@ -1620,10 +1620,8 @@ lde_address_list_free(struct lde_nbr *ln)
{
struct lde_addr *lde_addr;
- while ((lde_addr = TAILQ_FIRST(&ln->addr_list)) != NULL) {
- TAILQ_REMOVE(&ln->addr_list, lde_addr, entry);
+ while ((lde_addr = TAILQ_POP_FIRST(&ln->addr_list, entry)) != NULL)
free(lde_addr);
- }
}
static void zclient_sync_init(unsigned short instance)