summaryrefslogtreecommitdiff
path: root/lib/imsg.c
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 /lib/imsg.c
parent6317894ef3c5f5a21cca00c3a851f13b2d81541b (diff)
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 'lib/imsg.c')
-rw-r--r--lib/imsg.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/imsg.c b/lib/imsg.c
index 5424140720..935d137727 100644
--- a/lib/imsg.c
+++ b/lib/imsg.c
@@ -299,11 +299,10 @@ int imsg_get_fd(struct imsgbuf *ibuf)
int fd;
struct imsg_fd *ifd;
- if ((ifd = TAILQ_FIRST(&ibuf->fds)) == NULL)
+ if ((ifd = TAILQ_POP_FIRST(&ibuf->fds, entry)) == NULL)
return (-1);
fd = ifd->fd;
- TAILQ_REMOVE(&ibuf->fds, ifd, entry);
free(ifd);
return (fd);