From df246461ec910b3ce47350c1c2287a8b15faf7cc Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Fri, 16 Dec 2022 11:58:01 +0800 Subject: [PATCH] net/can: Remove the unnecessary "ret = OK;" in can_getsockopt Signed-off-by: Xiang Xiao --- net/can/can_getsockopt.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/net/can/can_getsockopt.c b/net/can/can_getsockopt.c index af6253ca3a..44392e2941 100644 --- a/net/can/can_getsockopt.c +++ b/net/can/can_getsockopt.c @@ -137,8 +137,6 @@ int can_getsockopt(FAR struct socket *psock, int level, int option, { ((struct can_filter *)value)[i] = conn->filters[i]; } - - ret = OK; } break; @@ -160,7 +158,6 @@ int can_getsockopt(FAR struct socket *psock, int level, int option, FAR int32_t *loopback = (FAR int32_t *)value; *loopback = conn->loopback; *value_len = sizeof(conn->loopback); - ret = OK; } 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; *recv_own_msgs = conn->recv_own_msgs; *value_len = sizeof(conn->recv_own_msgs); - ret = OK; } 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; *fd_frames = conn->fd_frames; *value_len = sizeof(conn->fd_frames); - ret = OK; } break; #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; *tx_deadline = conn->tx_deadline; *value_len = sizeof(conn->tx_deadline); - ret = OK; } break; #endif