Check return value from setsockopt(), found by Coverity Scan

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson 2019-11-05 15:56:47 +01:00
parent 3c2c353c37
commit e8674a8fd7

View File

@ -653,7 +653,8 @@ static void increase_rcvbuf(int fd)
if (len < RCVBUF_MINSIZE) {
len = RCVBUF_MINSIZE;
setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &len, sizeof(len));
if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &len, sizeof(len)))
logerror("Failed increasing size of socket receive buffer");
}
}