diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2018-09-08 19:25:00 +0200 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2018-09-08 20:34:32 +0200 |
commit | a43ad4fef85196592e59665fa9b69eddb30592e0 (patch) | |
tree | 943b674a163f17a9e6a83ab7871dd1845bac9beb /ldpd | |
parent | Merge pull request #2989 from donaldsharp/static_debug (diff) | |
download | frr-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.c | 4 |
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) |