From 22ed4467a413961816f317c641e436ca627d06d2 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Tue, 5 Apr 2022 07:10:30 +0200 Subject: treewide: Unchecked return value from library, CWE-252 All instances were harmless, but it might be useful to have some debug messages here and there. Reported by Coverity. Signed-off-by: Stefano Brivio --- udp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'udp.c') diff --git a/udp.c b/udp.c index 1c0fdc6..cbd3ac8 100644 --- a/udp.c +++ b/udp.c @@ -938,7 +938,8 @@ void udp_sock_handler(const struct ctx *c, union epoll_ref ref, uint32_t events, last_mh->msg_iov = &last_mh->msg_iov[i]; - sendmsg(c->fd_tap, last_mh, MSG_NOSIGNAL); + if (sendmsg(c->fd_tap, last_mh, MSG_NOSIGNAL) < 0) + debug("UDP: %li bytes to tap missing", missing); *iov_base -= first_offset; break; -- cgit v1.2.3