net: lwm2m: Remove misused errno check

Errno value is only significant when `recvfrom` function indicated an
error (by returning -1). We should not depend on it's value if no error
is notified.

As the return value of `recvfrom` is already checked, misused errno
verification can simply be removed.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit is contained in:
Robert Lubos 2019-02-18 12:28:56 +01:00 committed by Anas Nashif
commit f8502a9993

View file

@ -3929,11 +3929,6 @@ static void socket_receive_loop(void)
len = recvfrom(sock_ctx[i]->sock_fd, in_buf,
sizeof(in_buf) - 1, 0,
&from_addr, &from_addr_len);
if (errno) {
LOG_ERR("Sock RECV error: %d", errno);
/* TODO: handle error? */
continue;
}
if (len < 0) {
LOG_ERR("Error reading response: %d", errno);