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:
parent
cb0fd451c2
commit
f8502a9993
1 changed files with 0 additions and 5 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue