net/can: Remove the unnecessary "ret = OK;" in can_getsockopt
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
db84cd2e59
commit
df246461ec
@ -137,8 +137,6 @@ int can_getsockopt(FAR struct socket *psock, int level, int option,
|
|||||||
{
|
{
|
||||||
((struct can_filter *)value)[i] = conn->filters[i];
|
((struct can_filter *)value)[i] = conn->filters[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = OK;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -160,7 +158,6 @@ int can_getsockopt(FAR struct socket *psock, int level, int option,
|
|||||||
FAR int32_t *loopback = (FAR int32_t *)value;
|
FAR int32_t *loopback = (FAR int32_t *)value;
|
||||||
*loopback = conn->loopback;
|
*loopback = conn->loopback;
|
||||||
*value_len = sizeof(conn->loopback);
|
*value_len = sizeof(conn->loopback);
|
||||||
ret = OK;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -179,7 +176,6 @@ int can_getsockopt(FAR struct socket *psock, int level, int option,
|
|||||||
FAR int32_t *recv_own_msgs = (FAR int32_t *)value;
|
FAR int32_t *recv_own_msgs = (FAR int32_t *)value;
|
||||||
*recv_own_msgs = conn->recv_own_msgs;
|
*recv_own_msgs = conn->recv_own_msgs;
|
||||||
*value_len = sizeof(conn->recv_own_msgs);
|
*value_len = sizeof(conn->recv_own_msgs);
|
||||||
ret = OK;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -199,7 +195,6 @@ int can_getsockopt(FAR struct socket *psock, int level, int option,
|
|||||||
FAR int32_t *fd_frames = (FAR int32_t *)value;
|
FAR int32_t *fd_frames = (FAR int32_t *)value;
|
||||||
*fd_frames = conn->fd_frames;
|
*fd_frames = conn->fd_frames;
|
||||||
*value_len = sizeof(conn->fd_frames);
|
*value_len = sizeof(conn->fd_frames);
|
||||||
ret = OK;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
@ -223,7 +218,6 @@ int can_getsockopt(FAR struct socket *psock, int level, int option,
|
|||||||
FAR int32_t *tx_deadline = (FAR int32_t *)value;
|
FAR int32_t *tx_deadline = (FAR int32_t *)value;
|
||||||
*tx_deadline = conn->tx_deadline;
|
*tx_deadline = conn->tx_deadline;
|
||||||
*value_len = sizeof(conn->tx_deadline);
|
*value_len = sizeof(conn->tx_deadline);
|
||||||
ret = OK;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user