mirror of
https://github.com/apache/nuttx.git
synced 2025-12-18 16:36:09 +08:00
net/tcp/tcp_timer.c: Remove redundant assignments
Found by clang-check:
tcp/tcp_timer.c:185:15: warning: Value stored to 'result' is never read
result = tcp_callback(dev, conn, TCP_TIMEDOUT);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tcp/tcp_timer.c:264:23: warning: Value stored to 'result' is never read
result = tcp_callback(dev, listener, TCP_TIMEDOUT);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tcp/tcp_timer.c:300:19: warning: Value stored to 'result' is never read
result = tcp_callback(dev, conn, TCP_TIMEDOUT);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 warnings generated.
This commit is contained in:
committed by
Xiang Xiao
parent
16cd363cb0
commit
4f7745ae1c
@@ -182,7 +182,7 @@ void tcp_timer(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn,
|
||||
|
||||
/* Notify upper layers about the timeout */
|
||||
|
||||
result = tcp_callback(dev, conn, TCP_TIMEDOUT);
|
||||
tcp_callback(dev, conn, TCP_TIMEDOUT);
|
||||
|
||||
ninfo("TCP state: TCP_CLOSED\n");
|
||||
}
|
||||
@@ -261,7 +261,7 @@ void tcp_timer(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn,
|
||||
* connection has timed out.
|
||||
*/
|
||||
|
||||
result = tcp_callback(dev, listener, TCP_TIMEDOUT);
|
||||
tcp_callback(dev, listener, TCP_TIMEDOUT);
|
||||
}
|
||||
|
||||
/* We also send a reset packet to the remote host. */
|
||||
@@ -297,7 +297,7 @@ void tcp_timer(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn,
|
||||
* timed out.
|
||||
*/
|
||||
|
||||
result = tcp_callback(dev, conn, TCP_TIMEDOUT);
|
||||
tcp_callback(dev, conn, TCP_TIMEDOUT);
|
||||
|
||||
/* We also send a reset packet to the remote host. */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user