- This's the wrong way to fix this problem.
- Since the "TAILQ_FIRST()" always return diferent pointer as we call "TAILQ_REMOVE()", the clang static analyzer can't detect this behavior.
- Ignore this warning and keep files identical to its original one.
This reverts commit
5d6cc38ca36538583ff4c464c46a7c6de08608b6.
Signed-off-by: Hung-Weic Chiu <sppsorrg@gmail.com>
{
struct ibuf *buf;
- while ((buf = TAILQ_FIRST(&msgbuf->bufs)) != NULL) {
+ while ((buf = TAILQ_FIRST(&msgbuf->bufs)) != NULL)
ibuf_dequeue(msgbuf, buf);
- TAILQ_FIRST(&msgbuf->bufs) = NULL;
- }
}
int
fd = ifd->fd;
TAILQ_REMOVE(&ibuf->fds, ifd, entry);
free(ifd);
- TAILQ_FIRST(&ibuf->fds) = NULL;
return (fd);
}