mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-06-13 21:28:27 +00:00
bgpd: hide read() call from clang-SA
Sigh. clang-SA doesn't want you to call read() while holding a mutex. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
parent
e6cb1a90f2
commit
b5f196c35a
@ -512,7 +512,13 @@ static uint16_t bgp_read(struct peer_connection *connection, int *code_p)
|
|||||||
|
|
||||||
readsize = MIN(ibuf_work_space, sizeof(ibuf_scratch));
|
readsize = MIN(ibuf_work_space, sizeof(ibuf_scratch));
|
||||||
|
|
||||||
|
#ifdef __clang_analyzer__
|
||||||
|
/* clang-SA doesn't want you to call read() while holding a mutex */
|
||||||
|
(void)readsize;
|
||||||
|
nbytes = 0;
|
||||||
|
#else
|
||||||
nbytes = read(connection->fd, ibuf_scratch, readsize);
|
nbytes = read(connection->fd, ibuf_scratch, readsize);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* EAGAIN or EWOULDBLOCK; come back later */
|
/* EAGAIN or EWOULDBLOCK; come back later */
|
||||||
if (nbytes < 0 && ERRNO_IO_RETRY(errno)) {
|
if (nbytes < 0 && ERRNO_IO_RETRY(errno)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user