You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/06/11 03:47:20 UTC

[incubator-nuttx] 03/03: tcp_input: fix a confusing variable name and a comment

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 7d82e7a7c4e93f7592c8f8114943e24658eb7035
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Fri Jun 4 10:53:06 2021 +0900

    tcp_input: fix a confusing variable name and a comment
    
    It looks like a copy-and-paste mistake.
---
 net/tcp/tcp_input.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/net/tcp/tcp_input.c b/net/tcp/tcp_input.c
index d1b4b74..5823f24 100644
--- a/net/tcp/tcp_input.c
+++ b/net/tcp/tcp_input.c
@@ -419,17 +419,13 @@ found:
       (dev->d_len == 0 || dev->d_len == 1) &&
       conn->tx_unacked <= 0)
     {
-      uint32_t ackseq;
+      uint32_t seq;
       uint32_t rcvseq;
 
-      /* Get the sequence number of that has just been acknowledged by this
-       * incoming packet.
-       */
-
-      ackseq = tcp_getsequence(tcp->seqno);
+      seq = tcp_getsequence(tcp->seqno);
       rcvseq = tcp_getsequence(conn->rcvseq);
 
-      if (TCP_SEQ_LT(ackseq, rcvseq))
+      if (TCP_SEQ_LT(seq, rcvseq))
         {
           /* Send a "normal" acknowledgment of the KeepAlive probe */